From bc415d8f44c6bd4f24619049dfe36ed26d48b6af Mon Sep 17 00:00:00 2001 From: Eshan Date: Wed, 4 Aug 2021 23:54:17 +0530 Subject: [PATCH 01/13] kaggle argument fix --- hub/api/dataset.py | 7 +++++-- hub/auto/tests/test_kaggle.py | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hub/api/dataset.py b/hub/api/dataset.py index 14dd81ca76..422a51dd6d 100644 --- a/hub/api/dataset.py +++ b/hub/api/dataset.py @@ -351,8 +351,9 @@ def ingest_kaggle( tag: str, src: str, dest: str, - dest_creds: dict, compression: str, + dest_creds: dict = None, + kaggle_credentials: dict = None, overwrite: bool = False, **dataset_kwargs, ) -> Dataset: @@ -384,7 +385,9 @@ def ingest_kaggle( if os.path.samefile(src, dest): raise SamePathException(src) - download_kaggle_dataset(tag, local_path=src) + download_kaggle_dataset( + tag, local_path=src, kaggle_credentials=kaggle_credentials + ) ds = hub.ingest( src=src, diff --git a/hub/auto/tests/test_kaggle.py b/hub/auto/tests/test_kaggle.py index 5890c65381..f1374a3097 100644 --- a/hub/auto/tests/test_kaggle.py +++ b/hub/auto/tests/test_kaggle.py @@ -12,8 +12,8 @@ def test_ingestion_simple(local_ds: Dataset): tag="andradaolteanu/birdcall-recognition-data", src=kaggle_path, dest=local_ds.path, - dest_creds={}, compression="jpeg", + dest_creds={}, overwrite=False, ) @@ -28,8 +28,8 @@ def test_ingestion_sets(local_ds: Dataset): tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - dest_creds={}, compression="jpeg", + dest_creds={}, overwrite=False, ) @@ -57,8 +57,8 @@ def test_kaggle_exception(local_ds: Dataset): tag="thisiseshan/bird-classes", src=dummy_path, dest=dummy_path, - dest_creds=None, compression="jpeg", + dest_creds=None, overwrite=False, ) @@ -67,15 +67,15 @@ def test_kaggle_exception(local_ds: Dataset): tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - dest_creds={}, compression="jpeg", + dest_creds={}, overwrite=False, ) hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - dest_creds={}, compression="jpeg", + dest_creds={}, overwrite=False, ) From 65bd5817c5a3ae7a259bf6eddbf3094f622a02b1 Mon Sep 17 00:00:00 2001 From: Eshan Date: Thu, 5 Aug 2021 00:08:33 +0530 Subject: [PATCH 02/13] lint and mypy fixes --- hub/api/dataset.py | 1 + hub/auto/unstructured/kaggle.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hub/api/dataset.py b/hub/api/dataset.py index 422a51dd6d..9ae75992ea 100644 --- a/hub/api/dataset.py +++ b/hub/api/dataset.py @@ -371,6 +371,7 @@ def ingest_kaggle( - a local file system path of the form ./path/to/dataset or ~/path/to/dataset or path/to/dataset. - a memory path of the form mem://path/to/dataset which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist. dest_creds (dict): A dictionary containing credentials used to access the destination path of the dataset. + kaggle_creds (dict): A dictionary containing kaggle credentials {"username":"", "key": ""}. compression (str): Compression type of dataset. overwrite (bool): WARNING: If set to True this overwrites the dataset if it already exists. This can NOT be undone! Defaults to False. **dataset_kwargs: Any arguments passed here will be forwarded to the dataset creator function. diff --git a/hub/auto/unstructured/kaggle.py b/hub/auto/unstructured/kaggle.py index 569a51e007..8bd6d6529c 100644 --- a/hub/auto/unstructured/kaggle.py +++ b/hub/auto/unstructured/kaggle.py @@ -32,7 +32,7 @@ def _set_environment_credentials_if_none(kaggle_credentials: dict = None): os.environ[ENV_KAGGLE_KEY] = key -def download_kaggle_dataset(tag: str, local_path: str, kaggle_credentials: dict = {}): +def download_kaggle_dataset(tag: str, local_path: str, kaggle_credentials: dict = None): """Calls the kaggle API (https://www.kaggle.com/docs/api) to download a kaggle dataset and unzip it's contents. Args: From 540f217fef7d190ea009d76120abf0bcced9781f Mon Sep 17 00:00:00 2001 From: Eshan Date: Thu, 5 Aug 2021 00:18:01 +0530 Subject: [PATCH 03/13] lint fixes --- hub/api/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/api/dataset.py b/hub/api/dataset.py index 9ae75992ea..8d70a152e4 100644 --- a/hub/api/dataset.py +++ b/hub/api/dataset.py @@ -371,7 +371,7 @@ def ingest_kaggle( - a local file system path of the form ./path/to/dataset or ~/path/to/dataset or path/to/dataset. - a memory path of the form mem://path/to/dataset which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist. dest_creds (dict): A dictionary containing credentials used to access the destination path of the dataset. - kaggle_creds (dict): A dictionary containing kaggle credentials {"username":"", "key": ""}. + kaggle_credentials (dict): A dictionary containing kaggle credentials {"username":"", "key": ""}. compression (str): Compression type of dataset. overwrite (bool): WARNING: If set to True this overwrites the dataset if it already exists. This can NOT be undone! Defaults to False. **dataset_kwargs: Any arguments passed here will be forwarded to the dataset creator function. From 7214254712e9b6bb95d6abd2d1af55fc73fb124d Mon Sep 17 00:00:00 2001 From: Eshan Date: Thu, 5 Aug 2021 02:23:36 +0530 Subject: [PATCH 04/13] polishing --- hub/api/dataset.py | 14 +++++++------- hub/auto/tests/test_ingestion.py | 21 +++++++++------------ hub/auto/tests/test_kaggle.py | 15 +++++---------- 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/hub/api/dataset.py b/hub/api/dataset.py index 8d70a152e4..faf610704d 100644 --- a/hub/api/dataset.py +++ b/hub/api/dataset.py @@ -262,7 +262,7 @@ def ingest( src: str, dest: str, dest_creds: dict, - compression: str, + images_compression: str, overwrite: bool = False, **dataset_kwargs, ) -> Dataset: @@ -314,8 +314,8 @@ def ingest( - an s3 path of the form s3://bucketname/path/to/dataset. Credentials are required in either the environment or passed to the creds argument. - a local file system path of the form ./path/to/dataset or ~/path/to/dataset or path/to/dataset. - a memory path of the form mem://path/to/dataset which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist. + images_compression (str): For image classification datasets, this compression will be used for the `images` tensor. dest_creds (dict): A dictionary containing credentials used to access the destination path of the dataset. - compression (str): Compression type of dataset. overwrite (bool): WARNING: If set to True this overwrites the dataset if it already exists. This can NOT be undone! Defaults to False. **dataset_kwargs: Any arguments passed here will be forwarded to the dataset creator function. @@ -340,7 +340,7 @@ def ingest( # TODO: auto detect compression unstructured.structure( - ds, image_tensor_args={"sample_compression": compression} # type: ignore + ds, image_tensor_args={"sample_compression": images_compression} # type: ignore ) return ds # type: ignore @@ -351,7 +351,7 @@ def ingest_kaggle( tag: str, src: str, dest: str, - compression: str, + images_compression: str, dest_creds: dict = None, kaggle_credentials: dict = None, overwrite: bool = False, @@ -370,9 +370,9 @@ def ingest_kaggle( - an s3 path of the form s3://bucketname/path/to/dataset. Credentials are required in either the environment or passed to the creds argument. - a local file system path of the form ./path/to/dataset or ~/path/to/dataset or path/to/dataset. - a memory path of the form mem://path/to/dataset which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist. + images_compression (str): For image classification datasets, this compression will be used for the `images` tensor. dest_creds (dict): A dictionary containing credentials used to access the destination path of the dataset. - kaggle_credentials (dict): A dictionary containing kaggle credentials {"username":"", "key": ""}. - compression (str): Compression type of dataset. + kaggle_credentials (dict): A dictionary containing kaggle credentials {"username":"YOUR_USERNAME", "key": "YOUR_KEY"}. If None, environment variables/the kaggle.json file will be used if available. overwrite (bool): WARNING: If set to True this overwrites the dataset if it already exists. This can NOT be undone! Defaults to False. **dataset_kwargs: Any arguments passed here will be forwarded to the dataset creator function. @@ -394,7 +394,7 @@ def ingest_kaggle( src=src, dest=dest, dest_creds=dest_creds, - compression=compression, + images_compression=images_compression, overwrite=overwrite, **dataset_kwargs, ) diff --git a/hub/auto/tests/test_ingestion.py b/hub/auto/tests/test_ingestion.py index afc408c9d0..19dc0b0db6 100644 --- a/hub/auto/tests/test_ingestion.py +++ b/hub/auto/tests/test_ingestion.py @@ -12,21 +12,17 @@ def test_ingestion_simple(memory_ds: Dataset): hub.ingest( src="tests_auto/invalid_path", dest=memory_ds.path, - dest_creds=None, - compression="jpeg", + images_compression="jpeg", overwrite=False, ) with pytest.raises(SamePathException): - hub.ingest( - src=path, dest=path, dest_creds=None, compression="jpeg", overwrite=False - ) + hub.ingest(src=path, dest=path, images_compression="jpeg", overwrite=False) ds = hub.ingest( src=path, dest=memory_ds.path, - dest_creds=None, - compression="jpeg", + images_compression="jpeg", overwrite=False, ) @@ -41,8 +37,7 @@ def test_image_classification_sets(memory_ds: Dataset): ds = hub.ingest( src=path, dest=memory_ds.path, - dest_creds=None, - compression="jpeg", + images_compressionn="jpeg", overwrite=False, ) @@ -67,12 +62,14 @@ def test_ingestion_exception(memory_ds: Dataset): hub.ingest( src="tests_auto/invalid_path", dest=memory_ds.path, - dest_creds=None, - compression="jpeg", + images_compression="jpeg", overwrite=False, ) with pytest.raises(SamePathException): hub.ingest( - src=path, dest=path, dest_creds=None, compression="jpeg", overwrite=False + src=path, + dest=path, + images_compression="jpeg", + overwrite=False, ) diff --git a/hub/auto/tests/test_kaggle.py b/hub/auto/tests/test_kaggle.py index f1374a3097..600a9e5887 100644 --- a/hub/auto/tests/test_kaggle.py +++ b/hub/auto/tests/test_kaggle.py @@ -12,8 +12,7 @@ def test_ingestion_simple(local_ds: Dataset): tag="andradaolteanu/birdcall-recognition-data", src=kaggle_path, dest=local_ds.path, - compression="jpeg", - dest_creds={}, + images_compression="jpeg", overwrite=False, ) @@ -28,8 +27,7 @@ def test_ingestion_sets(local_ds: Dataset): tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - compression="jpeg", - dest_creds={}, + images_compression="jpeg", overwrite=False, ) @@ -57,8 +55,7 @@ def test_kaggle_exception(local_ds: Dataset): tag="thisiseshan/bird-classes", src=dummy_path, dest=dummy_path, - compression="jpeg", - dest_creds=None, + images_compression="jpeg", overwrite=False, ) @@ -67,15 +64,13 @@ def test_kaggle_exception(local_ds: Dataset): tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - compression="jpeg", - dest_creds={}, + images_compression="jpeg", overwrite=False, ) hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, dest=local_ds.path, - compression="jpeg", - dest_creds={}, + images_compression="jpeg", overwrite=False, ) From 5ff7c53be9fbe006e21df960e5abef94092bf588 Mon Sep 17 00:00:00 2001 From: Eshan Date: Thu, 5 Aug 2021 02:35:39 +0530 Subject: [PATCH 05/13] tiny fix --- hub/api/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/api/dataset.py b/hub/api/dataset.py index faf610704d..adb5b5371c 100644 --- a/hub/api/dataset.py +++ b/hub/api/dataset.py @@ -261,8 +261,8 @@ def like( def ingest( src: str, dest: str, - dest_creds: dict, images_compression: str, + dest_creds: dict = None, overwrite: bool = False, **dataset_kwargs, ) -> Dataset: From b8cfbaceda429abcfa97e79fb0657a9c73ecc15a Mon Sep 17 00:00:00 2001 From: Eshan Date: Thu, 5 Aug 2021 02:50:05 +0530 Subject: [PATCH 06/13] nit pick --- hub/auto/tests/test_ingestion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/auto/tests/test_ingestion.py b/hub/auto/tests/test_ingestion.py index 19dc0b0db6..0ac9765055 100644 --- a/hub/auto/tests/test_ingestion.py +++ b/hub/auto/tests/test_ingestion.py @@ -37,7 +37,7 @@ def test_image_classification_sets(memory_ds: Dataset): ds = hub.ingest( src=path, dest=memory_ds.path, - images_compressionn="jpeg", + images_compression="jpeg", overwrite=False, ) From b7ea769da4f7d796497737dc131b348217cb5bd7 Mon Sep 17 00:00:00 2001 From: Eshan Date: Fri, 6 Aug 2021 01:51:24 +0530 Subject: [PATCH 07/13] kaggle creds fix --- hub/auto/unstructured/kaggle.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hub/auto/unstructured/kaggle.py b/hub/auto/unstructured/kaggle.py index 8bd6d6529c..7b74d1b8a3 100644 --- a/hub/auto/unstructured/kaggle.py +++ b/hub/auto/unstructured/kaggle.py @@ -18,18 +18,20 @@ def _exec_command(command): def _set_environment_credentials_if_none(kaggle_credentials: dict = None): - if kaggle_credentials is None: - kaggle_credentials = {} + if kaggle_credentials is not None: + username = kaggle_credentials.get("username", None) + if not username: + raise KaggleMissingCredentialsError(ENV_KAGGLE_USERNAME) + os.environ[ENV_KAGGLE_USERNAME] = username + key = kaggle_credentials.get("key", None) + if not key: + raise KaggleMissingCredentialsError(ENV_KAGGLE_KEY) + os.environ[ENV_KAGGLE_KEY] = key + else: if ENV_KAGGLE_USERNAME not in os.environ: - username = kaggle_credentials.get("username", None) - if not username: - raise KaggleMissingCredentialsError(ENV_KAGGLE_USERNAME) - os.environ[ENV_KAGGLE_USERNAME] = username + raise KaggleMissingCredentialsError(ENV_KAGGLE_USERNAME) if ENV_KAGGLE_KEY not in os.environ: - key = kaggle_credentials.get("key", None) - if not key: - raise KaggleMissingCredentialsError(ENV_KAGGLE_KEY) - os.environ[ENV_KAGGLE_KEY] = key + raise KaggleMissingCredentialsError(ENV_KAGGLE_KEY) def download_kaggle_dataset(tag: str, local_path: str, kaggle_credentials: dict = None): From d43f4c0250d397d8ae2fea678080892ff6915282 Mon Sep 17 00:00:00 2001 From: Eshan Date: Fri, 6 Aug 2021 03:07:12 +0530 Subject: [PATCH 08/13] codecov patch --- hub/auto/tests/test_kaggle.py | 17 ++++++++++++++++- hub/tests/path_fixtures.py | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hub/auto/tests/test_kaggle.py b/hub/auto/tests/test_kaggle.py index 600a9e5887..d1e5778215 100644 --- a/hub/auto/tests/test_kaggle.py +++ b/hub/auto/tests/test_kaggle.py @@ -1,5 +1,10 @@ +from hub.auto.unstructured import kaggle from hub.api.dataset import Dataset -from hub.util.exceptions import KaggleDatasetAlreadyDownloadedError, SamePathException +from hub.util.exceptions import ( + KaggleDatasetAlreadyDownloadedError, + SamePathException, + KaggleMissingCredentialsError, +) from hub.tests.common import get_dummy_data_path import pytest import os @@ -59,6 +64,16 @@ def test_kaggle_exception(local_ds: Dataset): overwrite=False, ) + with pytest.raises(KaggleMissingCredentialsError): + hub.ingest_kaggle( + tag="thisiseshan/bird-classes", + src=kaggle_path, + dest=dummy_path, + images_compression="jpeg", + kaggle_credentials={}, + overwrite=False, + ) + with pytest.raises(KaggleDatasetAlreadyDownloadedError): hub.ingest_kaggle( tag="thisiseshan/bird-classes", diff --git a/hub/tests/path_fixtures.py b/hub/tests/path_fixtures.py index 554092e28f..d195ce5130 100644 --- a/hub/tests/path_fixtures.py +++ b/hub/tests/path_fixtures.py @@ -12,6 +12,7 @@ PYTEST_LOCAL_PROVIDER_BASE_ROOT, PYTEST_MEMORY_PROVIDER_BASE_ROOT, S3_OPT, + ENV_KAGGLE_USERNAME, ) import posixpath from hub.tests.common import ( From 63a2f86103e385de47e1b81dd4885e476cbd98d1 Mon Sep 17 00:00:00 2001 From: Eshan Date: Fri, 6 Aug 2021 03:08:40 +0530 Subject: [PATCH 09/13] remove env reference --- hub/tests/path_fixtures.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hub/tests/path_fixtures.py b/hub/tests/path_fixtures.py index d195ce5130..554092e28f 100644 --- a/hub/tests/path_fixtures.py +++ b/hub/tests/path_fixtures.py @@ -12,7 +12,6 @@ PYTEST_LOCAL_PROVIDER_BASE_ROOT, PYTEST_MEMORY_PROVIDER_BASE_ROOT, S3_OPT, - ENV_KAGGLE_USERNAME, ) import posixpath from hub.tests.common import ( From 788de5108c97f51babadee9bb4bbd9a75fd7ab11 Mon Sep 17 00:00:00 2001 From: Eshan Date: Sun, 8 Aug 2021 00:54:55 +0530 Subject: [PATCH 10/13] nit pick --- hub/auto/tests/_test_kaggle.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hub/auto/tests/_test_kaggle.py b/hub/auto/tests/_test_kaggle.py index 2ee83ccb63..f11a2aaec5 100644 --- a/hub/auto/tests/_test_kaggle.py +++ b/hub/auto/tests/_test_kaggle.py @@ -22,7 +22,7 @@ def test_ingestion_simple(local_ds: Dataset): ) assert list(ds.tensors.keys()) == ["images", "labels"] - assert ds["labels"].numpy().shape == (10,) + assert ds["labels"].numpy().shape == (10, 1) def test_ingestion_sets(local_ds: Dataset): @@ -74,14 +74,25 @@ def test_kaggle_exception(local_ds: Dataset): overwrite=False, ) - with pytest.raises(KaggleDatasetAlreadyDownloadedError): + with pytest.raises(KaggleMissingCredentialsError): hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, - dest=local_ds.path, + dest=dummy_path, images_compression="jpeg", + kaggle_credentials={}, overwrite=False, ) + + hub.ingest_kaggle( + tag="thisiseshan/bird-classes", + src=kaggle_path, + dest=local_ds.path, + images_compression="jpeg", + overwrite=False, + ) + + with pytest.raises(KaggleDatasetAlreadyDownloadedError): hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, From a1601553e50d9b049552b7c9c59533ff1d758e57 Mon Sep 17 00:00:00 2001 From: Eshan Date: Sun, 8 Aug 2021 01:39:16 +0530 Subject: [PATCH 11/13] increase coverage --- hub/auto/tests/_test_kaggle.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hub/auto/tests/_test_kaggle.py b/hub/auto/tests/_test_kaggle.py index f11a2aaec5..a2ef816d99 100644 --- a/hub/auto/tests/_test_kaggle.py +++ b/hub/auto/tests/_test_kaggle.py @@ -4,6 +4,7 @@ KaggleDatasetAlreadyDownloadedError, SamePathException, KaggleMissingCredentialsError, + ExternalCommandError, ) from hub.tests.common import get_dummy_data_path import pytest @@ -80,7 +81,16 @@ def test_kaggle_exception(local_ds: Dataset): src=kaggle_path, dest=dummy_path, images_compression="jpeg", - kaggle_credentials={}, + kaggle_credentials={"username": "thisiseshan", "password": "invalid"}, + overwrite=False, + ) + + with pytest.raises(ExternalCommandError): + hub.ingest_kaggle( + tag="thisiseshan/invalid-dataset", + src=kaggle_path, + dest=dummy_path, + images_compression="jpeg", overwrite=False, ) From f878a7851c04d18dd4222b909a4ff8c9267d9d03 Mon Sep 17 00:00:00 2001 From: Eshan Date: Sun, 8 Aug 2021 02:17:28 +0530 Subject: [PATCH 12/13] increase coverage --- hub/auto/tests/_test_kaggle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub/auto/tests/_test_kaggle.py b/hub/auto/tests/_test_kaggle.py index a2ef816d99..73dff09efc 100644 --- a/hub/auto/tests/_test_kaggle.py +++ b/hub/auto/tests/_test_kaggle.py @@ -71,7 +71,7 @@ def test_kaggle_exception(local_ds: Dataset): src=kaggle_path, dest=dummy_path, images_compression="jpeg", - kaggle_credentials={}, + kaggle_credentials={"not_username": "not_username"}, overwrite=False, ) @@ -81,7 +81,7 @@ def test_kaggle_exception(local_ds: Dataset): src=kaggle_path, dest=dummy_path, images_compression="jpeg", - kaggle_credentials={"username": "thisiseshan", "password": "invalid"}, + kaggle_credentials={"not_key": "not_key"}, overwrite=False, ) From 894b54492ad21287df7204fef1a4c617a9b12bc2 Mon Sep 17 00:00:00 2001 From: Eshan Date: Sun, 8 Aug 2021 03:13:58 +0530 Subject: [PATCH 13/13] increase coverage --- hub/auto/tests/_test_kaggle.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hub/auto/tests/_test_kaggle.py b/hub/auto/tests/_test_kaggle.py index 73dff09efc..d5c7f5e4cf 100644 --- a/hub/auto/tests/_test_kaggle.py +++ b/hub/auto/tests/_test_kaggle.py @@ -69,7 +69,7 @@ def test_kaggle_exception(local_ds: Dataset): hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, - dest=dummy_path, + dest=local_ds.path, images_compression="jpeg", kaggle_credentials={"not_username": "not_username"}, overwrite=False, @@ -79,9 +79,9 @@ def test_kaggle_exception(local_ds: Dataset): hub.ingest_kaggle( tag="thisiseshan/bird-classes", src=kaggle_path, - dest=dummy_path, + dest=local_ds.path, images_compression="jpeg", - kaggle_credentials={"not_key": "not_key"}, + kaggle_credentials={"username": "thisiseshan", "not_key": "not_key"}, overwrite=False, ) @@ -89,7 +89,7 @@ def test_kaggle_exception(local_ds: Dataset): hub.ingest_kaggle( tag="thisiseshan/invalid-dataset", src=kaggle_path, - dest=dummy_path, + dest=local_ds.path, images_compression="jpeg", overwrite=False, )