Jupyter Notebooks
Comet has a variety of support for running your experiments in Jupyter Notebooks, including in Google's Colab, Microsoft's Azure, Amazon's SageMaker and many others. There is only one requirement: when you are finished running a machine learning model, simply indicate that the experiment is completed with:
python
experiment.end()
Info
On cloud Jupyter Notebook providers, remember to !pip install comet_ml
or use the new %pip install comet_ml
.
In this manner, you can run many experiments in the notebook by always starting with:
python
experiment = Experiment()
and ending with experiment.end()
.
After issuing the experiment.end()
command and visiting the
experiment's page at www.comet.ml, you will
find that the Code tab now contains a textual representation of the
notebook. However, closer inspection shows that this code is the
history of commands that created the experiment, rather than being the
cells in the notebook. This is actually better than just the notebook,
because it relects the true history of commands rather than just a
snapshot of the notebook. Also note that when visiting an experiment's
page at www.comet.ml, the Reproduce button
will allow you to download this history as a notebook.
Back in the notebook, when running your experiment (or right after)
you may also issue an experiment.display()
command in a cell to show
the experiment's www.comet.ml page inside the
notebook.
For additional examples of using Comet and Jupyter Notebooks, please see our github.com notebook examples.