From 5a6df61d1feffe3e8d2c483d5ba05b65101e21ab Mon Sep 17 00:00:00 2001 From: Almaz <79905215+almazgimaev@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:26:36 +0100 Subject: [PATCH] Download all nested datasets when running from specific dataset (#22) --- src/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.py b/src/main.py index 0185b95..f156729 100644 --- a/src/main.py +++ b/src/main.py @@ -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]