comet_ml.start ΒΆ
start(
api_key: Optional[str] = None,
workspace: Optional[str] = None,
project: Optional[str] = None,
project_name: Optional[str] = None,
experiment_key: Optional[str] = None,
mode: Optional[str] = None,
online: Optional[bool] = None,
source: Optional[str] = None,
experiment_config: Optional[ExperimentConfig] = None,
) -> ExperimentBase
Returns an Experiment object to log data to. It can be used to log data to a new Comet Experiment, append data to an Existing Experiment or continue logging to a running experiment locally.
Parameters:
api_key
(str
, default:None
) βComet API key. It's recommended to configure the API Key with
comet login
.workspace
(str
, default:None
) βComet workspace name. If not provided, uses the default workspace.
project
(str
, default:None
) βComet project name. [Deprecated, use
project_name
instead]project_name
(str
, default:None
) βComet project name. Defaults to
Uncategorized
.experiment_key
(str
, default:None
) βThe Experiment identifier to be used for logging. This is used either to append data to an Existing Experiment or to control the key of new experiments (for example to match another identifier). Must be an alphanumeric string whose length is between 32 and 50 characters.
mode
(str
, default:None
) βControl how the Comet experiment is started.
"get_or_create"
: Starts a fresh experiment if required, or persists logging to an existing one."get"
: Continue logging to an existing experiment identified by theexperiment_key
value."create"
: Always creates of a new experiment, useful for HPO sweeps.
online
(boolean
, default:None
) βIf True, the data will be logged to Comet server, otherwise it will be stored locally in an offline experiment. Default is
True
.source
(str
, default:None
) βEnables the specification of the origin of an experiment.
experiment_config
(Optional[ExperimentConfig]
, default:None
) βadditional configuration options.
Returns:
ExperimentBase
βThe initialized Comet Experiment object. Returns a comet_ml.Experiment object when online is
True
and a comet_ml.OfflineExperiment object when online isFalse
.
Raises:
ValueError
βIf no API Key is set in online mode.
ExperimentNotFound
βIf mode="get" and the experiment_key doesn't exist, or you don't have access to it.
InvalidExperimentMode
β- If mode="get" but no experiment_key was passed or configured.
- If mode="create", an experiment_key was passed or configured and an Experiment with that Key already exists.