supervisely 6.73.320__py3-none-any.whl → 6.73.322__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.
@@ -39,7 +39,7 @@ from supervisely import (
39
39
  is_production,
40
40
  logger,
41
41
  )
42
- from supervisely._utils import abs_url, get_filename_from_headers
42
+ from supervisely._utils import abs_url, get_filename_from_headers, sync_call
43
43
  from supervisely.api.file_api import FileInfo
44
44
  from supervisely.app import get_synced_data_dir
45
45
  from supervisely.app.widgets import Progress
@@ -60,6 +60,7 @@ from supervisely.nn.utils import ModelSource
60
60
  from supervisely.output import set_directory
61
61
  from supervisely.project.download import (
62
62
  copy_from_cache,
63
+ download_async_or_sync,
63
64
  download_to_cache,
64
65
  get_cache_size,
65
66
  is_cached,
@@ -803,8 +804,9 @@ class TrainApp:
803
804
  :type total_images: int
804
805
  """
805
806
  with self.progress_bar_main(message="Downloading input data", total=total_images) as pbar:
807
+ logger.debug("Downloading project data without cache")
806
808
  self.progress_bar_main.show()
807
- download_project(
809
+ download_async_or_sync(
808
810
  api=self._api,
809
811
  project_id=self.project_id,
810
812
  dest_dir=self.project_dir,
@@ -834,6 +836,7 @@ class TrainApp:
834
836
 
835
837
  logger.info(self._get_cache_log_message(cached, to_download))
836
838
  with self.progress_bar_main(message="Downloading input data", total=total_images) as pbar:
839
+ logger.debug("Downloading project data with cache")
837
840
  self.progress_bar_main.show()
838
841
  download_to_cache(
839
842
  api=self._api,
@@ -1603,10 +1606,12 @@ class TrainApp:
1603
1606
  logger.info(f"Demo directory '{local_demo_dir}' does not exist")
1604
1607
  return
1605
1608
 
1606
- logger.debug(f"Uploading demo files to Supervisely")
1607
1609
  remote_demo_dir = join(remote_dir, "demo")
1608
1610
  local_files = sly_fs.list_files_recursively(local_demo_dir)
1609
1611
  total_size = sum([sly_fs.get_file_size(file_path) for file_path in local_files])
1612
+ logger.debug(
1613
+ f"Uploading demo files of total size {total_size} bytes to Supervisely Team Files directory '{remote_demo_dir}'"
1614
+ )
1610
1615
  with self.progress_bar_main(
1611
1616
  message="Uploading demo files to Team Files",
1612
1617
  total=total_size,
@@ -1614,11 +1619,13 @@ class TrainApp:
1614
1619
  unit_scale=True,
1615
1620
  ) as upload_artifacts_pbar:
1616
1621
  self.progress_bar_main.show()
1617
- remote_dir = self._api.file.upload_directory(
1618
- self.team_id,
1619
- local_demo_dir,
1620
- remote_demo_dir,
1621
- progress_size_cb=upload_artifacts_pbar,
1622
+ remote_dir = sync_call(
1623
+ self._api.file.upload_directory_async(
1624
+ team_id=self.team_id,
1625
+ local_dir=local_demo_dir,
1626
+ remote_dir=remote_demo_dir,
1627
+ progress_size_cb=upload_artifacts_pbar.update,
1628
+ )
1622
1629
  )
1623
1630
  self.progress_bar_main.hide()
1624
1631
 
@@ -1690,11 +1697,12 @@ class TrainApp:
1690
1697
  Path: /experiments/{project_id}_{project_name}/{task_id}_{framework_name}/
1691
1698
  Example path: /experiments/43192_Apples/68271_rt-detr/
1692
1699
  """
1693
- logger.info(f"Uploading directory: '{self.output_dir}' to Supervisely")
1694
1700
  task_id = self.task_id
1695
1701
 
1696
1702
  remote_artifacts_dir = f"/{self._experiments_dir_name}/{self.project_id}_{self.project_name}/{task_id}_{self.framework_name}/"
1697
-
1703
+ logger.info(
1704
+ f"Uploading artifacts directory: '{self.output_dir}' to Supervisely Team Files directory '{remote_artifacts_dir}'"
1705
+ )
1698
1706
  # Clean debug directory if exists
1699
1707
  if task_id == "debug-session":
1700
1708
  if self._api.file.dir_exists(self.team_id, f"{remote_artifacts_dir}/", True):
@@ -1725,11 +1733,13 @@ class TrainApp:
1725
1733
  unit_scale=True,
1726
1734
  ) as upload_artifacts_pbar:
1727
1735
  self.progress_bar_main.show()
1728
- remote_dir = self._api.file.upload_directory(
1729
- self.team_id,
1730
- self.output_dir,
1731
- remote_artifacts_dir,
1732
- progress_size_cb=upload_artifacts_pbar,
1736
+ remote_dir = sync_call(
1737
+ self._api.file.upload_directory_async(
1738
+ team_id=self.team_id,
1739
+ local_dir=self.output_dir,
1740
+ remote_dir=remote_artifacts_dir,
1741
+ progress_size_cb=upload_artifacts_pbar.update,
1742
+ )
1733
1743
  )
1734
1744
  self.progress_bar_main.hide()
1735
1745
 
@@ -2088,6 +2098,7 @@ class TrainApp:
2088
2098
  self.project_info.id, version_id=project_version_id
2089
2099
  )
2090
2100
 
2101
+ file_info = None
2091
2102
  if self.model_source == ModelSource.CUSTOM:
2092
2103
  file_info = self._api.file.get_info_by_path(
2093
2104
  self.team_id,
@@ -2496,32 +2507,33 @@ class TrainApp:
2496
2507
  def _upload_export_weights(
2497
2508
  self, export_weights: Dict[str, str], remote_dir: str
2498
2509
  ) -> Dict[str, str]:
2510
+ """Uploads export weights (any other specified formats) to Supervisely Team Files.
2511
+ The default export is handled by the `_upload_artifacts` method."""
2512
+ file_dest_paths = []
2513
+ size = 0
2514
+ for path in export_weights.values():
2515
+ file_name = sly_fs.get_file_name_with_ext(path)
2516
+ file_dest_paths.append(join(remote_dir, self._export_dir_name, file_name))
2517
+ size += sly_fs.get_file_size(path)
2499
2518
  with self.progress_bar_main(
2500
- message="Uploading export weights",
2501
- total=len(export_weights),
2519
+ message=f"Uploading {len(export_weights)} export weights",
2520
+ total=size,
2521
+ unit="B",
2522
+ unit_scale=True,
2502
2523
  ) as export_upload_main_pbar:
2524
+ logger.debug(f"Uploading {len(export_weights)} export weights of size {size} bytes")
2525
+ logger.debug(f"Destination paths: {file_dest_paths}")
2503
2526
  self.progress_bar_main.show()
2504
- for path in export_weights.values():
2505
- file_name = sly_fs.get_file_name_with_ext(path)
2506
- file_size = sly_fs.get_file_size(path)
2507
- with self.progress_bar_secondary(
2508
- message=f"Uploading '{file_name}' ",
2509
- total=file_size,
2510
- unit="bytes",
2511
- unit_scale=True,
2512
- ) as export_upload_secondary_pbar:
2513
- self.progress_bar_secondary.show()
2514
- destination_path = join(remote_dir, self._export_dir_name, file_name)
2515
- self._api.file.upload(
2516
- self.team_id,
2517
- path,
2518
- destination_path,
2519
- export_upload_secondary_pbar,
2520
- )
2521
- export_upload_main_pbar.update(1)
2527
+ sync_call(
2528
+ self._api.file.upload_bulk_async(
2529
+ team_id=self.team_id,
2530
+ src_paths=export_weights.values(),
2531
+ dst_paths=file_dest_paths,
2532
+ progress_cb=export_upload_main_pbar.update,
2533
+ )
2534
+ )
2522
2535
 
2523
2536
  self.progress_bar_main.hide()
2524
- self.progress_bar_secondary.hide()
2525
2537
 
2526
2538
  remote_export_weights = {
2527
2539
  runtime: join(self._export_dir_name, sly_fs.get_file_name_with_ext(path))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.320
3
+ Version: 6.73.322
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -1,6 +1,6 @@
1
1
  supervisely/README.md,sha256=XM-DiMC6To3I9RjQZ0c61905EFRR_jnCUx2q3uNR-X8,3331
2
2
  supervisely/__init__.py,sha256=mtgVKiRSlnRU7yKG0Re130mBL10wCzsNfOfi-w-Kj4c,10833
3
- supervisely/_utils.py,sha256=DX_2n8zWTG2AzW8bCvU9z9joLzcwzVjLmvslVF39pE8,16022
3
+ supervisely/_utils.py,sha256=hYzGRVAh-cB2RmqixHbaJQZHy4byNip4KZm2Gdt8P7k,16849
4
4
  supervisely/function_wrapper.py,sha256=R5YajTQ0GnRp2vtjwfC9hINkzQc0JiyGsu8TER373xY,1912
5
5
  supervisely/sly_logger.py,sha256=z92Vu5hmC0GgTIJO1n6kPDayRW9__8ix8hL6poDZj-Y,6274
6
6
  supervisely/tiny_timer.py,sha256=hkpe_7FE6bsKL79blSs7WBaktuPavEVu67IpEPrfmjE,183
@@ -22,10 +22,10 @@ supervisely/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  supervisely/api/advanced_api.py,sha256=Nd5cCnHFWc3PSUrCtENxTGtDjS37_lCHXsgXvUI3Ti8,2054
23
23
  supervisely/api/agent_api.py,sha256=ShWAIlXcWXcyI9fqVuP5GZVCigCMJmjnvdGUfLspD6Y,8890
24
24
  supervisely/api/annotation_api.py,sha256=kuk4qwojTJxYr2iqAKbW-QhWw_DFc4TsjA2Wc2MEaqw,68449
25
- supervisely/api/api.py,sha256=YBE6yi682H5dy3BBQtESmfC9hKZcbHyYRPNGLRldgSU,66014
25
+ supervisely/api/api.py,sha256=6TczKT1t0MWlbArSW31RmeyWP04pqngfUO_NrG5FETE,66287
26
26
  supervisely/api/app_api.py,sha256=RsbVej8WxWVn9cNo5s3Fqd1symsCdsfOaKVBKEUapRY,71927
27
27
  supervisely/api/dataset_api.py,sha256=GH7prDRJKyJlTv_7_Y-RkTwJN7ED4EkXNqqmi3iIdI4,41352
28
- supervisely/api/file_api.py,sha256=v2FsD3oljwNPqcDgEJRe8Bu5k0PYKzVhqmRb5QFaHAQ,83422
28
+ supervisely/api/file_api.py,sha256=xVM4fFeIc52aKnxduCIU7L6Rgd7Rh36rzTJ8hVT8hw4,88925
29
29
  supervisely/api/github_api.py,sha256=NIexNjEer9H5rf5sw2LEZd7C1WR-tK4t6IZzsgeAAwQ,623
30
30
  supervisely/api/image_annotation_tool_api.py,sha256=YcUo78jRDBJYvIjrd-Y6FJAasLta54nnxhyaGyanovA,5237
31
31
  supervisely/api/image_api.py,sha256=WIML_6N1qgOWBm3acexmGSWz4hAaSxlYmUtbytROaP8,192375
@@ -565,7 +565,7 @@ supervisely/collection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
565
565
  supervisely/collection/key_indexed_collection.py,sha256=x2UVlkprspWhhae9oLUzjTWBoIouiWY9UQSS_MozfH0,37643
566
566
  supervisely/collection/str_enum.py,sha256=Zp29yFGvnxC6oJRYNNlXhO2lTSdsriU1wiGHj6ahEJE,1250
567
567
  supervisely/convert/__init__.py,sha256=ropgB1eebG2bfLoJyf2jp8Vv9UkFujaW3jVX-71ho1g,1353
568
- supervisely/convert/base_converter.py,sha256=eCFnvyoMI96rWjB5amFPZX2fI_TSdr__ruqxwQIbfFo,18537
568
+ supervisely/convert/base_converter.py,sha256=rRMIxY3h7cX5WAu_qn7w9vzRBcDB_jLZm5u_XQh7QG4,18563
569
569
  supervisely/convert/converter.py,sha256=tWxTDfFv7hwzQhUQrBxzfr6WP8FUGFX_ewg5T2HbUYo,8959
570
570
  supervisely/convert/image/__init__.py,sha256=JEuyaBiiyiYmEUYqdn8Mog5FVXpz0H1zFubKkOOm73I,1395
571
571
  supervisely/convert/image/image_converter.py,sha256=8vak8ZoKTN1ye2ZmCTvCZ605-Rw1AFLIEo7bJMfnR68,10426
@@ -634,10 +634,13 @@ supervisely/convert/pointcloud/ply/ply_helper.py,sha256=YfLiV9m6a4NNEMs0J32dmMTL
634
634
  supervisely/convert/pointcloud/sly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
635
635
  supervisely/convert/pointcloud/sly/sly_pointcloud_converter.py,sha256=r56Rwil-55cRnd0sIePFGrf_xXa-lKQSfwhEUrjOquk,5070
636
636
  supervisely/convert/pointcloud/sly/sly_pointcloud_helper.py,sha256=kOluL97FfCFfIvnUE_FeN8iQLMlwdiMR5gayorOGDXw,3968
637
- supervisely/convert/pointcloud_episodes/__init__.py,sha256=tzrN8kKCpa-0PNp6s1uVIoGse_VKGb45KzCCUSYlH5Y,457
637
+ supervisely/convert/pointcloud_episodes/__init__.py,sha256=LePLQFEjXwhXap2zOY9SVTbW_NMbxKYZKBjBdRLimKE,557
638
638
  supervisely/convert/pointcloud_episodes/pointcloud_episodes_converter.py,sha256=qULUzO96BvWgNVmyxSQ0pUPBPG3WHgUJuK_U7Z8NM-g,9428
639
639
  supervisely/convert/pointcloud_episodes/bag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
640
640
  supervisely/convert/pointcloud_episodes/bag/bag_converter.py,sha256=jzWKXoFUWu11d5WlPfT1hphCubYpq_lhQZmhh07xZdQ,1659
641
+ supervisely/convert/pointcloud_episodes/kitti_360/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
642
+ supervisely/convert/pointcloud_episodes/kitti_360/kitti_360_converter.py,sha256=ls3Pgf9WYTtaTzf6nLCL3gMjG6zZ_EAVKE5OJSFAOPc,10033
643
+ supervisely/convert/pointcloud_episodes/kitti_360/kitti_360_helper.py,sha256=EHyJTRfIpUC3lETJOCTI_OY4ddmT0eTFLMMhOvSeCm0,12372
641
644
  supervisely/convert/pointcloud_episodes/lyft/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
642
645
  supervisely/convert/pointcloud_episodes/lyft/lyft_converter.py,sha256=QXreWUJ-QhoWgLPqRxCayatYCCCuSV6Z2XCZKScrD3o,10419
643
646
  supervisely/convert/pointcloud_episodes/nuscenes_conv/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -708,7 +711,7 @@ supervisely/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
708
711
  supervisely/io/docker_utils.py,sha256=hb_HXGM8IYB0PF-nD7NxMwaHgzaxIFxofsUzQ_RCUZI,7935
709
712
  supervisely/io/env.py,sha256=QQDDE79sz4inRHfcXoAKr3IzqkXQ0qleJ0YYojmHoCk,17712
710
713
  supervisely/io/exception_handlers.py,sha256=_nAgMFeE94bCxEvWakR82hMtdOJUyn7Gc7OymMxI9WI,36484
711
- supervisely/io/fs.py,sha256=-KkS-w9v_46mm2ET6y8YfTB9EHu4T2iz0-ap0SNg538,52691
714
+ supervisely/io/fs.py,sha256=DvLDzZUEpo7_ieSbt1gw8BYmoSsNUBcGKpXVs0Wqckk,55296
712
715
  supervisely/io/fs_cache.py,sha256=985gvBGzveLcDudgz10E4EWVjP9jxdU1Pa0GFfCBoCA,6520
713
716
  supervisely/io/github_utils.py,sha256=jGmvQJ5bjtACuSFABzrxL0jJdh14SezovrHp8T-9y8g,1779
714
717
  supervisely/io/json.py,sha256=VvyqXZl22nb6_DJK3TUOPetd5xq9xwRFKumWqsGs7iI,8679
@@ -876,7 +879,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
876
879
  supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
877
880
  supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
878
881
  supervisely/nn/inference/cache.py,sha256=q4F7ZRzZghNWSVFClXEIHNMNW4PK6xddYckCFUgyhCo,32027
879
- supervisely/nn/inference/inference.py,sha256=RJPTCd-y5FtQ234Zdbj7D6stsR3ZpVo8GLpiXXAr2Bg,158665
882
+ supervisely/nn/inference/inference.py,sha256=SqfIgohv0U3USQpHerzkrnfIeC7JKGeQA49Tocliu1k,165877
880
883
  supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
881
884
  supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
882
885
  supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
@@ -973,7 +976,7 @@ supervisely/nn/tracker/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
973
976
  supervisely/nn/tracker/utils/gmc.py,sha256=3JX8979H3NA-YHNaRQyj9Z-xb9qtyMittPEjGw8y2Jo,11557
974
977
  supervisely/nn/tracker/utils/kalman_filter.py,sha256=eSFmCjM0mikHCAFvj-KCVzw-0Jxpoc3Cfc2NWEjJC1Q,17268
975
978
  supervisely/nn/training/__init__.py,sha256=gY4PCykJ-42MWKsqb9kl-skemKa8yB6t_fb5kzqR66U,111
976
- supervisely/nn/training/train_app.py,sha256=xG7zbPEV3aNZHoubUJ8-MRTXJ1yWZ6pRMiah86U8Spc,104274
979
+ supervisely/nn/training/train_app.py,sha256=yVsMdMlV6OHCRMJ63-hPmTfdsC3Z1-0ohphsMtDMpPw,104944
977
980
  supervisely/nn/training/gui/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
978
981
  supervisely/nn/training/gui/classes_selector.py,sha256=8UgzA4aogOAr1s42smwEcDbgaBj_i0JLhjwlZ9bFdIA,3772
979
982
  supervisely/nn/training/gui/gui.py,sha256=CnT_QhihrxdSHKybpI0pXhPLwCaXEana_qdn0DhXByg,25558
@@ -1075,9 +1078,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1075
1078
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1076
1079
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1077
1080
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1078
- supervisely-6.73.320.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1079
- supervisely-6.73.320.dist-info/METADATA,sha256=cRTVnwUZDV5OZ4jHo0rWWPrMc5ryNCORoOOlrEu--zw,33596
1080
- supervisely-6.73.320.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1081
- supervisely-6.73.320.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1082
- supervisely-6.73.320.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1083
- supervisely-6.73.320.dist-info/RECORD,,
1081
+ supervisely-6.73.322.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1082
+ supervisely-6.73.322.dist-info/METADATA,sha256=tXlMoMRbbXrc18yQVTx6Ti09xSaTCC4TyKgLUoNIC_U,33596
1083
+ supervisely-6.73.322.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1084
+ supervisely-6.73.322.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1085
+ supervisely-6.73.322.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1086
+ supervisely-6.73.322.dist-info/RECORD,,