f38a634a118fe55d6f98ede2d82624f4cba38fcf,mlflow/store/sqlalchemy_store.py,SqlAlchemyStore,get_experiment_by_name,#SqlAlchemyStore#Any#,288

Before Change


            if len(experiments) == 0:
                return None

            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()

    def delete_experiment(self, experiment_id):
        with self.ManagedSessionMaker() as session:

After Change


        Specialized implementation for SQL backed store.
        
        with self.ManagedSessionMaker() as session:
            stages = LifecycleStage.view_type_to_stages(ViewType.ALL)
            experiment = session \
                .query(SqlExperiment) \
                .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

    def delete_experiment(self, experiment_id):
        with self.ManagedSessionMaker() as session:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mlflow/mlflow
Commit Name: f38a634a118fe55d6f98ede2d82624f4cba38fcf
Time: 2019-09-04
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: get_experiment_by_name


Project Name: mlflow/mlflow
Commit Name: 3efbb0e1a096c4d1f6bd98fab26740faf8daad0a
Time: 2019-01-24
Author: mani@databricks.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: _list_experiments


Project Name: mlflow/mlflow
Commit Name: 3efbb0e1a096c4d1f6bd98fab26740faf8daad0a
Time: 2019-01-24
Author: mani@databricks.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: _get_run