Skip to content

Run experiments offline

There are times when you might want to log your training run but do not have access to a computer with an Internet connection. For such cases, Comet provides an OfflineExperiment object that allows you to track your run and save the results to a directory on your file system.

The OfflineExperiment object behaves in exactly the same way as the Experiment object. The only difference is that when you log data, it is written to a directory on the file system.

import comet_ml
experiment = comet_ml.OfflineExperiment()
experiment.log_metrics({'accuracy': 0.5, 'loss': 0.001})
experiment.end()

At the end of your run, the Experiment summary provides instructions for uploading the run to the Comet UI.

COMET INFO: To upload this offline experiment, run:
    comet upload /content/.cometml-runs/54338792a0324a39bc4ce26ae148e97e.zip

Try it out!ΒΆ

An example is in this Colab Notebook:

Open In Colab

Jun. 3, 2022