Skip to content

comet_ml.end ¶

end()

If there is a running experiment, finalize it and flush all pending data to the Comet server. See end for more details. If no experiment was running, this does nothing.

comet_ml.error_mode ¶

error_mode() -> None

Enables the printing of error tracebacks to the console logger for debugging purposes.

comet_ml.flush ¶

flush() -> Optional[bool]

If there is a running experiment, flush all pending data to the Comet server. See flush for more details. If no experiment was running, this does nothing.

Returns:

  • Optional[bool] –

    If there is a running experiment, returns a Boolean True or False indicating whether the flush was successful or not. If no experiment was running, returns None.

comet_ml.get_running_experiment ¶

get_running_experiment() -> Optional[BaseExperiment]

Returns a currently running experiment or None if there is no such.

Returns:

  • Optional[BaseExperiment] –

    Returns the running experiment or None.

Example
1
2
3
import comet_ml

experiment = comet_ml.get_running_experiment()

comet_ml.get_s3_uploader ¶

get_s3_uploader(
    bucket: str, key: Optional[str] = None, **kwargs
) -> UploadCallback

Return an upload callback that can be used to upload offline archive when an online Experiment has fallback to offline.

See also: comet_ml.Experiment.set_offline_zip_uploader

The AWS credentials must be present either via environment variables or in the user home directory in format supported by boto3 client as described at: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

Parameters:

Returns:

  • UploadCallback –

    A callback to be used to upload offline experiment data to S3.

For example:

from comet_ml import get_s3_uploader

upload_callback = get_s3_uploader(bucket="my_bucket")
experiment = Experiment()
experiment.set_offline_zip_uploader(upload_callback)
Nov. 18, 2024