openml-python icon indicating copy to clipboard operation
openml-python copied to clipboard

fix nonetype error during print for tasks without class labels

Open willcmartin opened this issue 3 years ago • 0 comments

Reference Issue

Fixes #1100 and #1058

What does this PR implement/fix? Explain your changes.

Previously, if class_labels attribute of task is None when __repr__ was called, a NoneType error was thrown. Now "# of Classes" is not printed if there are no class_labels.

How should this PR be tested?

Any other comments?

I followed the implementation suggestion from #1100 where "# of Classes" is ignored. Let me know if this is no longer the best solution to this issue.

willcmartin avatar Jun 27 '22 14:06 willcmartin