supervisely 6.73.272__py3-none-any.whl → 6.73.273__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of supervisely might be problematic. Click here for more details.
- supervisely/project/project.py +17 -7
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/METADATA +1 -1
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/RECORD +7 -7
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/LICENSE +0 -0
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/WHEEL +0 -0
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.272.dist-info → supervisely-6.73.273.dist-info}/top_level.txt +0 -0
supervisely/project/project.py
CHANGED
|
@@ -4432,23 +4432,29 @@ async def _download_project_async(
|
|
|
4432
4432
|
switch_size = kwargs.get("switch_size", 1.28 * 1024 * 1024)
|
|
4433
4433
|
# batch size for bulk download
|
|
4434
4434
|
batch_size = kwargs.get("batch_size", 100)
|
|
4435
|
-
# number of workers
|
|
4436
|
-
num_workers = kwargs.get("num_workers", 5)
|
|
4437
4435
|
|
|
4438
4436
|
if semaphore is None:
|
|
4439
4437
|
semaphore = api.get_default_semaphore()
|
|
4440
4438
|
|
|
4441
|
-
|
|
4442
|
-
|
|
4439
|
+
# number of workers
|
|
4440
|
+
num_workers = min(kwargs.get("num_workers", semaphore._value), 10)
|
|
4441
|
+
|
|
4442
|
+
async def worker(queue: asyncio.Queue, stop_event: asyncio.Event):
|
|
4443
|
+
while not stop_event.is_set():
|
|
4443
4444
|
task = await queue.get()
|
|
4444
4445
|
if task is None:
|
|
4445
4446
|
break
|
|
4446
|
-
|
|
4447
|
+
try:
|
|
4447
4448
|
await task
|
|
4448
|
-
|
|
4449
|
+
except Exception as e:
|
|
4450
|
+
logger.error(f"Error in _download_project_async worker: {e}")
|
|
4451
|
+
stop_event.set()
|
|
4452
|
+
finally:
|
|
4453
|
+
queue.task_done()
|
|
4449
4454
|
|
|
4450
4455
|
queue = asyncio.Queue()
|
|
4451
|
-
|
|
4456
|
+
stop_event = asyncio.Event()
|
|
4457
|
+
workers = [asyncio.create_task(worker(queue, stop_event)) for _ in range(num_workers)]
|
|
4452
4458
|
|
|
4453
4459
|
dataset_ids = set(dataset_ids) if (dataset_ids is not None) else None
|
|
4454
4460
|
project_fs = None
|
|
@@ -4588,6 +4594,10 @@ async def _download_project_async(
|
|
|
4588
4594
|
for _ in range(num_workers):
|
|
4589
4595
|
await queue.put(None)
|
|
4590
4596
|
await asyncio.gather(*workers)
|
|
4597
|
+
|
|
4598
|
+
if stop_event.is_set():
|
|
4599
|
+
raise RuntimeError("Download process was stopped due to an error in one of the workers.")
|
|
4600
|
+
|
|
4591
4601
|
try:
|
|
4592
4602
|
create_readme(dest_dir, project_id, api)
|
|
4593
4603
|
except Exception as e:
|
|
@@ -1000,7 +1000,7 @@ supervisely/project/data_version.py,sha256=nknaWJSUCwoDyNG9_d1KA-GjzidhV9zd9Cn8c
|
|
|
1000
1000
|
supervisely/project/download.py,sha256=zb8sb4XZ6Qi3CP7fmtLRUAYzaxs_W0WnOfe2x3ZVRMs,24639
|
|
1001
1001
|
supervisely/project/pointcloud_episode_project.py,sha256=yiWdNBQiI6f1O9sr1pg8JHW6O-w3XUB1rikJNn3Oung,41866
|
|
1002
1002
|
supervisely/project/pointcloud_project.py,sha256=Kx1Vaes-krwG3BiRRtHRLQxb9G5m5bTHPN9IzRqmNWo,49399
|
|
1003
|
-
supervisely/project/project.py,sha256=
|
|
1003
|
+
supervisely/project/project.py,sha256=nKzuDw3DwcKtRg0fJyNrWE-XC7co0x3HTsAUWN8B2QI,189088
|
|
1004
1004
|
supervisely/project/project_meta.py,sha256=26s8IiHC5Pg8B1AQi6_CrsWteioJP2in00cRNe8QlW0,51423
|
|
1005
1005
|
supervisely/project/project_settings.py,sha256=NLThzU_DCynOK6hkHhVdFyezwprn9UqlnrLDe_3qhkY,9347
|
|
1006
1006
|
supervisely/project/project_type.py,sha256=_3RqW2CnDBKFOvSIrQT1RJQaiHirs34_jiQS8CkwCpo,530
|
|
@@ -1062,9 +1062,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1062
1062
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1063
1063
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1064
1064
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1065
|
-
supervisely-6.73.
|
|
1066
|
-
supervisely-6.73.
|
|
1067
|
-
supervisely-6.73.
|
|
1068
|
-
supervisely-6.73.
|
|
1069
|
-
supervisely-6.73.
|
|
1070
|
-
supervisely-6.73.
|
|
1065
|
+
supervisely-6.73.273.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1066
|
+
supervisely-6.73.273.dist-info/METADATA,sha256=uQxOZ2st0ZkJaK6YX4oZ5bVvX5YfFgrD9izZG_8oIxM,33573
|
|
1067
|
+
supervisely-6.73.273.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1068
|
+
supervisely-6.73.273.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1069
|
+
supervisely-6.73.273.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1070
|
+
supervisely-6.73.273.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|