Skip to content

Commit

Permalink
docs: explain that task.get_dataset passes kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
knyazer committed Sep 17, 2024
1 parent 2f36b07 commit ba8eef4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openml/tasks/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ 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, **kwargs) -> datasets.OpenMLDataset:
"""Download dataset associated with task."""
def get_dataset(self, /, **kwargs) -> datasets.OpenMLDataset:
"""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(
Expand Down

0 comments on commit ba8eef4

Please sign in to comment.