c4920ea11ef69a5597b83af961685034c8330e99,openml/runs/run.py,OpenMLRun,__str__,#OpenMLRun#,67
Before Change
header = "{}\n{}\n".format(header, "=" * len(header))
base_url = "{}".format(openml.config.server[:-len("api/v1/xml")])
fields = pd.Series({"Uploader Name": self.uploader_name,
"Uploader Profile": "{}u/{}".format(base_url, self.uploader),
"Metric": self.task_evaluation_measure,
"Run ID": self.run_id,
"Run URL": "{}r/{}".format(base_url, self.run_id),
"Task ID": self.task_id,
"Task Type": self.task_type,
"Task URL": "{}t/{}".format(base_url, self.run_id),
"Flow ID": self.flow_id,
"Flow Name": self.flow_name,
"Flow URL": "{}f/{}".format(base_url, self.flow_id),
"Setup ID": self.setup_id,
"Setup String": self.setup_string,
"Dataset ID": self.dataset_id,
"Dataset URL": "{}d/{}".format(base_url, self.dataset_id)})
if self.task_evaluation_measure in self.evaluations:
value = self.evaluations[self.task_evaluation_measure]
fields = fields.append(pd.Series({"Result": value}))
order = ["Uploader Name", "Uploader Profile", "Metric", "Result", "Run ID", "Run URL",
"Task ID", "Task Type", "Task URL", "Flow ID", "Flow Name", "Flow URL",
"Setup ID", "Setup String", "Dataset ID", "Dataset URL"]
fields = list(fields.reindex(order).dropna().iteritems())
longest_field_name_length = max(len(name) for name, value in fields)
field_line_format = "{{:.<{}}}: {{}}".format(longest_field_name_length)
body = "\n".join(field_line_format.format(name, value) for name, value in fields)
return header + body
def _repr_pretty_(self, pp, cycle):
After Change
order = ["Uploader Name", "Uploader Profile", "Metric", "Result", "Run ID", "Run URL",
"Task ID", "Task Type", "Task URL", "Flow ID", "Flow Name", "Flow URL",
"Setup ID", "Setup String", "Dataset ID", "Dataset URL"]
fields = [(key, fields[key]) for key in order if key in fields]
longest_field_name_length = max(len(name) for name, value in fields)
field_line_format = "{{:.<{}}}: {{}}".format(longest_field_name_length)
body = "\n".join(field_line_format.format(name, value) for name, value in fields)
return header + body
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 19
Instances Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/runs/run.py
Class Name: OpenMLRun
Method Name: __str__
Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/runs/run.py
Class Name: OpenMLRun
Method Name: __str__
Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/setups/setup.py
Class Name: OpenMLParameter
Method Name: __str__
Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/flows/flow.py
Class Name: OpenMLFlow
Method Name: __str__