bf4ccba3f001c0e1187a15d0f02ca251769c73c8,mlflow/store/sqlalchemy_store.py,SqlAlchemyStore,log_metric,#SqlAlchemyStore#Any#Any#,190
Before Change
self._get_or_create(SqlMetric, run_uuid=run_uuid, key=metric.key,
value=metric.value, timestamp=metric.timestamp)
except sqlalchemy.exc.IntegrityError:
raise MlflowException("Metric={} must be unique".format(metric),
INVALID_PARAMETER_VALUE)
def log_param(self, run_uuid, param):
run = self._get_run(run_uuid)
self._check_run_is_active(run)
After Change
self.session.rollback()
existing_metric = [m for m in run.metrics
if m.key == metric.key and m.timestamp == metric.timestamp]
if len(existing_metric) == 0:
raise MlflowException("Log metric request failed for run ID={}. Attempted to log"
" metric={}. Error={}".format(run_uuid,
(metric.key, metric.value),
str(ie)))
else:
m = existing_metric[0]
raise MlflowException("Metric={} must be unique. Metric already logged value {} "
"at {}".format(metric, m.value, m.timestamp),
INVALID_PARAMETER_VALUE)
def get_metric(self, run_uuid, metric_key):
metric = self.session.query(SqlMetric).filter_by(
run_uuid=run_uuid, key=metric_key
).order_by(sqlalchemy.desc(SqlMetric.timestamp)).first()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: mlflow/mlflow
Commit Name: bf4ccba3f001c0e1187a15d0f02ca251769c73c8
Time: 2019-01-29
Author: mani@databricks.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_metric
Project Name: mlflow/mlflow
Commit Name: bf4ccba3f001c0e1187a15d0f02ca251769c73c8
Time: 2019-01-29
Author: mani@databricks.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_param
Project Name: mlflow/mlflow
Commit Name: 469d93a7430bbb3e79140dfa31bd016b3b221c8a
Time: 2020-08-03
Author: sueann@databricks.com
File Name: mlflow/store/artifact/dbfs_artifact_repo.py
Class Name:
Method Name: dbfs_artifact_repo_factory