Conversation
Codecov Report
@@ Coverage Diff @@
## develop #541 +/- ##
==========================================
Coverage ? 89.82%
==========================================
Files ? 32
Lines ? 2920
Branches ? 0
==========================================
Hits ? 2623
Misses ? 297
Partials ? 0
Continue to review full report at Codecov.
|
|
@ArlindKadra could you please rebase this on the development branch and update for the fact that we have multiple task classes by now? |
| if not isinstance(task, OpenMLClusteringTask): | ||
| task.class_labels = \ | ||
| dataset.retrieve_class_labels(task.target_name) | ||
| task.download_split() |
There was a problem hiding this comment.
Would it make sense to move this into the task classes? If they have a split and class labels they retrieve them, otherwise, they don't. Also, how does this work for regression tasks (regarding class labels)?
There was a problem hiding this comment.
Nice point, it does not work for regression. What do you think about this.
As for your first point, I do not really like it, because then we have to call get_dataset from the task.
if isinstance(task, OpenMLSupervisedTask):
task.download_split()
if isinstance(task, OpenMLClassificationTask):
task.class_labels = \
dataset.retrieve_class_labels(task.target_name)
There was a problem hiding this comment.
Agreed. Your proposed solution is fine for this.
| task = openml.tasks.get_task(1) | ||
| self.assertIsInstance(task, OpenMLTask) | ||
|
|
||
| def test_get_task_clustering(self): |
There was a problem hiding this comment.
Could you please add a unit test for regression, too.
…tasks implementation
Reference Issue
#538
What does this PR implement/fix? Explain your changes.
Handling cases where tasks have only one input. Change to the cache dir.
How should this PR be tested?
Added unit test for get_task with different task types.