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


        
        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:
            experiment = self._get_experiment(session, experiment_id, ViewType.ACTIVE_ONLY)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: pgmpy/pgmpy
Commit Name: e1ef6a6cdf5e2d722453e483adfbde35ab7f3562
Time: 2015-10-21
Author: yashuseth2503@gmail.com
File Name: pgmpy/models/ClusterGraph.py
Class Name: ClusterGraph
Method Name: check_model


Project Name: thenetcircle/dino
Commit Name: 614069a65b0c047aa5382cbde291c768bb1df5db
Time: 2016-11-04
Author: oscar.eriks@gmail.com
File Name: dino/db/rdbms/handler.py
Class Name: DatabaseRdbms
Method Name: remove_current_rooms_for_user