openml.tasks
.get_task¶
- openml.tasks.get_task(task_id: int, *dataset_args, download_splits: bool | None = None, **get_dataset_kwargs) OpenMLTask ¶
Download OpenML task for a given task ID.
Downloads the task representation. By default, this will also download the data splits and the dataset. From version 0.15.0 onwards, the splits nor the dataset will not be downloaded by default.
Use the download_splits parameter to control whether the splits are downloaded. Moreover, you may pass additional parameter (args or kwargs) that are passed to
openml.datasets.get_dataset()
. For backwards compatibility, if download_data is passed as an additional parameter and download_splits is not explicitly set, download_data also overrules download_splits’s value (deprecated from Version 0.15.0 onwards).- Parameters:
- task_idint
The OpenML task id of the task to download.
- download_splits: bool (default=True)
Whether to download the splits as well. From version 0.15.0 onwards this is independent of download_data and will default to
False
.- dataset_args, get_dataset_kwargs
Args and kwargs can be used pass optional parameters to
openml.datasets.get_dataset()
. This includes download_data. If set to True the splits are downloaded as well (deprecated from Version 0.15.0 onwards). The args are only present for backwards compatibility and will be removed from version 0.15.0 onwards.
- Returns:
- task: OpenMLTask