Description
TypeError thrown when calling the print method on a openml.runs.run.OpenMLRun object when flow_name is None.
Steps/Code to Reproduce
fromsklearnimportensemblefromopenmlimporttasks, flows, runsimportopenmltask=tasks.get_task(3954)
clf=ensemble.RandomForestClassifier()
flow=flows.sklearn_to_flow(clf)
run=runs.run_flow_on_task(task, flow)
print(run) #error
Validating that the flow_name is None:
In [87]: run.flow_nameisNoneOut[87]: True
Expected Results
In [88]: print(run)
Out[88]: [runid: None, taskid: 3954, flowid: 8656, flowname: None]
Actual Results
In [74]: print(run)
---------------------------------------------------------------------------TypeErrorTraceback (mostrecentcalllast)
<ipython-input-74-7667ec7d87d4>in<module>()
---->1print(run)
/usr/local/lib/python3.6/site-packages/openml/runs/run.pyin__str__(self)
57def__str__(self):
58flow_name=self.flow_name--->59iflen(flow_name) >26:
60# long enough to show sklearn.pipeline.Pipeline61flow_name=flow_name[:26] +"..."TypeError: objectoftype'NoneType'hasnolen()
Versions
Darwin-17.4.0-x86_64-i386-64bit
Python 3.6.5 (default, Apr 25 2018, 14:23:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]
NumPy 1.15.0
SciPy 1.1.0
Scikit-Learn 0.19.2
OpenML 0.7.0
Description
TypeError thrown when calling the print method on a
openml.runs.run.OpenMLRunobject whenflow_nameisNone.Steps/Code to Reproduce
Validating that the
flow_nameisNone:Expected Results
Actual Results
Versions