New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single input task partial fix #541
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Your proposed solution is fine for this.
@@ -156,6 +156,11 @@ def test_get_task_with_cache(self): | |||
task = openml.tasks.get_task(1) | |||
self.assertIsInstance(task, OpenMLTask) | |||
|
|||
def test_get_task_clustering(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a unit test for regression, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I can
…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.