c172fcbd5943f36b1bb62721e49661c9eb1cf5e1,mlflow/store/file_store.py,FileStore,_get_metric_from_file,#Any#Any#,408

Before Change


        if len(metric_data) == 0:
            raise Exception("Metric "%s" is malformed. No data found." % metric_name)
        last_line = metric_data[-1]
        timestamp, val = last_line.strip().split(" ")
        return Metric(metric_name, float(val), int(timestamp))

    def get_all_metrics(self, run_uuid):
        _validate_run_id(run_uuid)

After Change


        // based on their first differing element. Therefore, we use max() operator to find the
        // largest value at the largest timestamp. For more information, see
        // https://docs.python.org/3/reference/expressions.html//value-comparisons
        max_timestamp, max_value = max(metric_data)
        return Metric(metric_name, max_value, max_timestamp)

    def get_all_metrics(self, run_uuid):
        _validate_run_id(run_uuid)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: mlflow/mlflow
Commit Name: c172fcbd5943f36b1bb62721e49661c9eb1cf5e1
Time: 2019-03-16
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/file_store.py
Class Name: FileStore
Method Name: _get_metric_from_file


Project Name: mlflow/mlflow
Commit Name: 89bba8ac86662a1321ac67bca1e64017f55303f1
Time: 2019-04-19
Author: smurching@gmail.com
File Name: mlflow/store/file_store.py
Class Name: FileStore
Method Name: _get_metric_from_file


Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: