hub.auto.unstructured.kaggle
- hub.auto.unstructured.kaggle.download_kaggle_dataset(tag: str, local_path: str, kaggle_credentials: Optional[dict] = None, exist_ok: bool = False)
Calls the kaggle API (https://www.kaggle.com/docs/api) to download a kaggle dataset and unzip it’s contents.
- Parameters
tag (str) – Kaggle dataset tag. Example: “coloradokb/dandelionimages” points to https://www.kaggle.com/coloradokb/dandelionimages
local_path (str) – Path where the kaggle dataset will be downloaded and unzipped. Only local path downloading is supported.
kaggle_credentials (dict) – Credentials are gathered from the environment variables or ~/kaggle.json. If those don’t exist, the kaggle_credentials argument will be used.
exist_ok (bool) – If the kaggle dataset was already downloaded, and exist_ok is True, no error is thrown.
- Raises
KaggleMissingCredentialsError – If no kaggle credentials are found.
KaggleDatasetAlreadyDownloadedError – If the dataset tag already exists in local_path.