Start tracking a training run¶
Each training run is an Experiment
in Comet. When you start an Experiment
with Comet, you unlock the ability to interactively analyze the Experiment performance and manage its state over time.
Start tracking a training run¶
When you start an Experiment
, Comet instantly begins tracking all attributes associated to the code execution at the url displayed after Experiment creation.
Before you start tracking your first traning run, we recommend calling the comet_ml.login()
method. It will prompt you for your API key if it hasn't been saved already. You can learn about how to configure your API key in Configure the Comet SDK.
You can then start logging a training run using the comet_ml.start()
method:
1 2 3 4 |
|
1 2 3 4 |
|
Tip
The comet_ml.start
method has an optional ExperimentConfig
argument that can be used to set the name of the Experiment or configure the data that should be automatically logged. You can learn more about it in the SDK reference documentation.
Once an Experiment has been started, Comet will automatically start logging:
- Metrics and hyper-parameters thanks to our many integrations.
- The code file your Experiment was created in.
- The git commit and git patch (uncommitted files) if you are running within a git repository.
- Console output logs.
- Installed python packages.
- System metrics (Memory usage, GPU usage, etc).
Log metrics, parameters, and assets to your Experiment¶
In addition to all the data Comet logs for you, you can log any other types of data to the Comet platform using one of our logging methods.
In the example below we log a metric and an image:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Comet automatically associates my_metric, my_parameter, and my_image.png to the Experiment
represented by the exp
object.