issue-tracking icon indicating copy to clipboard operation
issue-tracking copied to clipboard

unable to find caller source code in a jupyter notebook

Open Dannynis opened this issue 1 year ago • 0 comments

Describe the Bug

When using experiment.log_code() inside jupyter notebook (or in colab), im getting: "unable to find caller source code in a jupyter notebook"

only when the experiment ENDS it manged to log the code perfectly.

Sometimes its problematic, if for instance the experiment couldn't finish running because the task was killed, and then its impossible to know which code was running of that experiment.

Expected behavior

The code to be logged immediately

Where is the issue?

  • Comet Python SDK
  • Comet UI

To Reproduce

Just start any notebook and try to use:

experiment = comet_ml.Experiment(display_summary_level=0)

exp_name = 'name'

experiment.set_name(exp_name) experiment.log_code()

Quick fix

experiment = comet_ml.Experiment(display_summary_level=0)

experiment.set_name(exp_name) experiment.log_code() experiment.end()

experiment = comet_ml.ExistingExperiment(display_summary_level=0, previous_experiment=experiment.get_key())

Dannynis avatar Nov 30 '24 17:11 Dannynis