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 ```