Fix dataset add files

Fix docs typo
This commit is contained in:
allegroai 2021-01-10 12:58:13 +02:00
parent 12e575a155
commit 14706c03e1
2 changed files with 3 additions and 1 deletions

View File

@ -853,6 +853,8 @@ class Dataset(object):
wildcard = wildcard or '*' wildcard = wildcard or '*'
# single file, no need for threading # single file, no need for threading
if path.is_file(): if path.is_file():
if not local_base_folder.is_dir():
local_base_folder = local_base_folder.parent
file_entry = self._calc_file_hash( file_entry = self._calc_file_hash(
FileEntry(local_path=path.absolute().as_posix(), FileEntry(local_path=path.absolute().as_posix(),
relative_path=(Path(dataset_path or '.') / path.relative_to(local_base_folder)).as_posix(), relative_path=(Path(dataset_path or '.') / path.relative_to(local_base_folder)).as_posix(),

View File

@ -58,7 +58,7 @@ args = parser.parse_args()
task = Task.init(project_name='examples', task_name='dataset demo') task = Task.init(project_name='examples', task_name='dataset demo')
# getting a local copy of the dataset # 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 # go over the files in `dataset_folder` and train your model
``` ```