supervisely 6.73.385__py3-none-any.whl → 6.73.386__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.
@@ -3,6 +3,7 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import os
6
7
  import time
7
8
  from dataclasses import asdict
8
9
  from pathlib import Path
@@ -708,16 +709,12 @@ class DeployApi:
708
709
  )
709
710
 
710
711
  runtime = get_runtime(runtime)
711
- experiment_task_id = experiment_info.task_id
712
- experiment_task_info = self._api.task.get_info_by_id(experiment_task_id)
713
- if experiment_task_info is None:
714
- raise ValueError(f"Task with ID '{experiment_task_id}' not found")
715
-
712
+ module = None
716
713
  module_id = None
717
714
  serve_app_name = None
718
715
  if with_module:
719
- train_module_id = experiment_task_info["meta"]["app"]["moduleId"]
720
- module = self.get_serving_app_by_train_app(module_id=train_module_id)
716
+ framework_name = experiment_info.framework_name
717
+ module = self.find_serving_app_by_framework(framework_name)
721
718
  serve_app_name = module["name"]
722
719
  module_id = module["id"]
723
720
  logger.debug(f"Serving app detected: '{serve_app_name}'. Module ID: '{module_id}'")
@@ -768,10 +765,15 @@ class DeployApi:
768
765
  "runtime": runtime,
769
766
  }
770
767
 
771
- config = experiment_info.model_files.get("config")
772
- if config is not None:
773
- deploy_params["model_files"]["config"] = f"{experiment_info.artifacts_dir}{config}"
774
- logger.debug(f"Config file added: {experiment_info.artifacts_dir}{config}")
768
+ for file_key, file_path in experiment_info.model_files.items():
769
+ full_file_path = os.path.join(experiment_info.artifacts_dir, file_path)
770
+ if not self._api.file.exists(team_id, full_file_path):
771
+ logger.debug(f"Model file not found: '{full_file_path}'. Trying to find it by checkpoint path.")
772
+ full_file_path = os.path.join(artifacts_dir, file_path)
773
+ if not self._api.file.exists(team_id, full_file_path):
774
+ raise ValueError(f"Model file not found: '{full_file_path}'. Make sure that the file exists in the artifacts directory.")
775
+ deploy_params["model_files"][file_key] = full_file_path
776
+ logger.debug(f"Model file added: {full_file_path}")
775
777
  return module_id, serve_app_name, deploy_params
776
778
 
777
779
  def _set_auto_runtime_by_checkpoint(self, checkpoint_path: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.385
3
+ Version: 6.73.386
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -55,7 +55,7 @@ supervisely/api/entity_annotation/figure_api.py,sha256=rmsE3L_JfqN94sLN637pQ0syi
55
55
  supervisely/api/entity_annotation/object_api.py,sha256=gbcNvN_KY6G80Me8fHKQgryc2Co7VU_kfFd1GYILZ4E,8875
56
56
  supervisely/api/entity_annotation/tag_api.py,sha256=IapvSZmakjdOn0yvqP2tQRY8gkZg0bcvIZBwWRcafrg,18996
57
57
  supervisely/api/nn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
- supervisely/api/nn/deploy_api.py,sha256=fA5yk3-Q66BL821iu68HpsGWWO2qHXCcWTmrXoHE4gE,37008
58
+ supervisely/api/nn/deploy_api.py,sha256=yxTfi_B8KfKFxv410n4nt4OJiy18lJoZVScXnVCRYgA,37236
59
59
  supervisely/api/nn/neural_network_api.py,sha256=VYqpHb6xqCeEUofTNfOGUhvjI_5Di3T26qwVp5Z-0hE,10643
60
60
  supervisely/api/pointcloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  supervisely/api/pointcloud/pointcloud_annotation_api.py,sha256=xIXqCu0rKYsGt5ezh2EFT2utwsVrr2Xo-MOWUCnbvXc,11259
@@ -1103,9 +1103,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1103
1103
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1104
1104
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1105
1105
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1106
- supervisely-6.73.385.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1107
- supervisely-6.73.385.dist-info/METADATA,sha256=38qHHIiRGEYffwGVbazc2eXQ4_fNNjlxROUqPhBgH-4,35154
1108
- supervisely-6.73.385.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1109
- supervisely-6.73.385.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1110
- supervisely-6.73.385.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1111
- supervisely-6.73.385.dist-info/RECORD,,
1106
+ supervisely-6.73.386.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1107
+ supervisely-6.73.386.dist-info/METADATA,sha256=pAcUu38hzyDhqOlzLArYsO0AzNHXluQ4MbM0UtAm1nk,35154
1108
+ supervisely-6.73.386.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1109
+ supervisely-6.73.386.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1110
+ supervisely-6.73.386.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1111
+ supervisely-6.73.386.dist-info/RECORD,,