603404b5a92645e4009b870da7ae630a60090aa4,hyperio/reporting.py,Reporting,_load_data,#Reporting#,36

Before Change


    def _load_data(self):

        data = pd.read_csv(self.filename, header=None)
        data[14] = [i[1] for i in data[14].str.split()]
        data[15] = data[15].str.replace(""|>|<|\.|class|keras|optimizers|\ ", "")
        data[16] = [i[1] for i in data[16].str.split()]

        float_cols = data.select_dtypes(float).columns

After Change


        data = pd.read_csv(self.filename)
        data["optimizer"] = data["optimizer"].str.replace(""|>|<|\.|class|keras|optimizers|\ ", "")

        for col in ["loss", "activation", "last_activation"]:
            try:
                data[col] = [i[1] for i in data[col].str.split()]
            except KeyError:
                pass

        float_cols = data.select_dtypes(float).columns
        data[float_cols] = data[float_cols].round(3)

        return data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: autonomio/talos
Commit Name: 603404b5a92645e4009b870da7ae630a60090aa4
Time: 2018-05-07
Author: mailme@mikkokotila.com
File Name: hyperio/reporting.py
Class Name: Reporting
Method Name: _load_data


Project Name: ray-project/ray
Commit Name: 2cf4c7253ce1fd01975fcf970e52434e44f6d71f
Time: 2021-03-04
Author: ekhliang@gmail.com
File Name: python/ray/util/client/worker.py
Class Name: Worker
Method Name: get


Project Name: google/deepvariant
Commit Name: de37b10f2cbe01bee7baedbab37f485a6e7246aa
Time: 2017-12-04
Author: no-reply@google.com
File Name: deepvariant/docker/gcp_deepvariant_runner.py
Class Name:
Method Name: _run_make_examples


Project Name: google/deepvariant
Commit Name: de37b10f2cbe01bee7baedbab37f485a6e7246aa
Time: 2017-12-04
Author: no-reply@google.com
File Name: deepvariant/docker/gcp_deepvariant_runner.py
Class Name:
Method Name: _run_call_variants