if len(experiments) > 1:
raise MlflowException("Expected only 1 experiment with name={}. Found {}.".format(
experiment_name, len(experiments)), INVALID_STATE)
return experiments[0].to_mlflow_entity()
After Change
.options(*self._get_eager_experiment_query_options()) \
.filter(
SqlExperiment.name == experiment_name,
SqlExperiment.lifecycle_stage.in_(stages)) \
.one_or_none()
return experiment.to_mlflow_entity() if experiment is not None else None