From 14706c03e1b32e8312c4f1f61bd94b98c27c424b Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 10 Jan 2021 12:58:13 +0200 Subject: [PATCH] Fix dataset add files Fix docs typo --- clearml/datasets/dataset.py | 2 ++ docs/datasets.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clearml/datasets/dataset.py b/clearml/datasets/dataset.py index e877c8d5..d240809d 100644 --- a/clearml/datasets/dataset.py +++ b/clearml/datasets/dataset.py @@ -853,6 +853,8 @@ class Dataset(object): wildcard = wildcard or '*' # single file, no need for threading if path.is_file(): + if not local_base_folder.is_dir(): + local_base_folder = local_base_folder.parent file_entry = self._calc_file_hash( FileEntry(local_path=path.absolute().as_posix(), relative_path=(Path(dataset_path or '.') / path.relative_to(local_base_folder)).as_posix(), diff --git a/docs/datasets.md b/docs/datasets.md index 40c13ad3..d192409a 100644 --- a/docs/datasets.md +++ b/docs/datasets.md @@ -58,7 +58,7 @@ args = parser.parse_args() task = Task.init(project_name='examples', task_name='dataset demo') # getting a local copy of the dataset -dataset_folder = Datset.get(dataset_id=args.dataset).get_local_copy() +dataset_folder = Dataset.get(dataset_id=args.dataset).get_local_copy() # go over the files in `dataset_folder` and train your model ```