Skip to content

Commit

Permalink
Download all nested datasets when running from specific dataset (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev authored Dec 2, 2024
1 parent 14f1d8a commit 5a6df61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def download(project: sly.Project) -> str:

if dataset_id is not None:
dataset_ids = [dataset_id]
nested_datasets = api.dataset.get_nested(project.id, dataset_id)
nested_dataset_ids = [dataset.id for dataset in nested_datasets]
dataset_ids.extend(nested_dataset_ids)
else:
datasets = api.dataset.get_list(project.id, recursive=True)
dataset_ids = [dataset.id for dataset in datasets]
Expand Down

0 comments on commit 5a6df61

Please sign in to comment.