Skip to content
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

Pass kwargs through task to get_dataset #1345

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions openml/tasks/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,12 @@ def _get_repr_body_fields(self) -> Sequence[tuple[str, str | int | list[str]]]:
]
return [(key, fields[key]) for key in order if key in fields]

def get_dataset(self) -> datasets.OpenMLDataset:
"""Download dataset associated with task."""
return datasets.get_dataset(self.dataset_id)
def get_dataset(self, **kwargs) -> datasets.OpenMLDataset:
PGijsbers marked this conversation as resolved.
Show resolved Hide resolved
"""Download dataset associated with task.

Accepts the same keyword arguments as the `openml.datasets.get_dataset`.
"""
return datasets.get_dataset(self.dataset_id, **kwargs)

def get_train_test_split_indices(
self,
Expand Down
Loading