Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
  • Loading branch information
BenWilson2 committed Jan 9, 2024
1 parent 462dcf5 commit b83fd2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
18 changes: 13 additions & 5 deletions docs/source/tracking/tracking-api.rst
Expand Up @@ -60,12 +60,20 @@ local path to log data to a directory. The URI defaults to ``mlruns``.

:py:func:`mlflow.get_tracking_uri` returns the current tracking URI.

:py:func:`mlflow.create_experiment` creates a new experiment and returns its ID. Runs can be
launched under the experiment by passing the experiment ID to ``mlflow.start_run``.
:py:func:`mlflow.create_experiment` creates a new experiment and returns the experiment ID. Runs can be
launched under the experiment by passing the experiment ID to ``mlflow.start_run`` or
by setting the active experiment with :py:func:`mlflow.set_experiment`, passing in the experiment ID of the created
experiment.

:py:func:`mlflow.set_experiment` sets an experiment as active and returns the active experiment instance. If you do not
specify an experiment in :py:func:`mlflow.start_run`, new runs are launched under this experiment.

.. note::
If the experiment being set by name does not exist, a new experiment will be
created with the given name. After the experiment has been created, it will be set
as the active experiment. On certain platforms, such as Databricks, the experiment name
must be an absolute path, e.g. ``"/Users/<username>/my-experiment"``.

:py:func:`mlflow.set_experiment` sets an experiment as active. If the experiment does not exist,
creates a new experiment. If you do not specify an experiment in :py:func:`mlflow.start_run`, new
runs are launched under this experiment.

:py:func:`mlflow.start_run` returns the currently active run (if one exists), or starts a new run
and returns a :py:class:`mlflow.ActiveRun` object usable as a context manager for the
Expand Down
15 changes: 7 additions & 8 deletions mlflow/tracking/fluent.py
Expand Up @@ -91,14 +91,13 @@ def set_experiment(
name via `experiment_name` or by ID via `experiment_id`. The experiment name and ID cannot
both be specified.
.. note:: If the experiment being set by name does not exist, a new experiment will be
created with the given name. After the experiment has been created, it will be set
as the active experiment.
:param experiment_name: Case sensitive name of the experiment to be activated. If an experiment
with this name does not exist, a new experiment wth this name is
created. On certain platforms such as Databricks, the experiment name
must an absolute path, e.g. ``"/Users/<username>/my-experiment"``.
.. note::
If the experiment being set by name does not exist, a new experiment will be
created with the given name. After the experiment has been created, it will be set
as the active experiment. On certain platforms, such as Databricks, the experiment name
must be an absolute path, e.g. ``"/Users/<username>/my-experiment"``.
:param experiment_name: Case sensitive name of the experiment to be activated.
:param experiment_id: ID of the experiment to be activated. If an experiment with this ID
does not exist, an exception is thrown.
:return: An instance of :py:class:`mlflow.entities.Experiment` representing the new active
Expand Down

0 comments on commit b83fd2e

Please sign in to comment.