Offline Log History for Testing

I’m interested in loading the results of a run (e.g., everything logging with wandb.log) from an offline run.

The use case is for CI / testing where I’d like to immediately verify the results of a run for testing purposes but not interested in loading this data to the cloud.

How can this be accomplished in offline mode? The ideal workflow is to run the test, then at the end of the run, extract the run history and compare it with a golden set of results without having to sync to the cloud.

Thanks.

Hello JJ:
Thanks for reaching out to W&B. Here are two ways of achieving what you are looking for here.

  1. After you finished he offline run, you can use the following command to access the values of your run
    wandb sync --view --verbose run-<ID>.wandb

    #You can use this python code to extract the values and fit them in your workflowfrom wandb.proto import wandb_internal_pb2from wandb.sdk.internal import datastoredata_path = "your_run_file.wandb"ds = datastore.DataStore()ds.open_for_scan(data_path)for _ in some_range: data = ds.scan_record() pb = wandb_internal_pb2.Record() pb.ParseFromString(data[1]) record_type = pb.WhichOneof(“record_type”) if record_type == “history”: tracked_value_0 = pb.history.item[0].value_json # and so on

  2. You always use a self-mangaed instance to keep everything local but use all the nice UI features.

Let me know if this helps.
Best, W&B

Hi JJ,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Weights & Biases

Hi JJ, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!