supervisely 6.73.341__py3-none-any.whl → 6.73.343__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.
- supervisely/convert/image/image_helper.py +2 -2
- supervisely/nn/inference/inference.py +22 -21
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/METADATA +1 -1
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/RECORD +8 -8
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/LICENSE +0 -0
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/WHEEL +0 -0
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.341.dist-info → supervisely-6.73.343.dist-info}/top_level.txt +0 -0
|
@@ -48,8 +48,8 @@ def validate_mimetypes(name: str, path: str) -> list:
|
|
|
48
48
|
mimetypes.add_type("image/webp", ".webp") # to extend types_map
|
|
49
49
|
mimetypes.add_type("image/jpeg", ".jfif") # to extend types_map
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
with open(path, "rb") as f:
|
|
52
|
+
mimetype = magic.from_buffer(f.read(), mime=True)
|
|
53
53
|
file_ext = get_file_ext(path).lower()
|
|
54
54
|
if file_ext in mimetypes.guess_all_extensions(mimetype):
|
|
55
55
|
return name
|
|
@@ -709,23 +709,24 @@ class Inference:
|
|
|
709
709
|
self.load_model(**deploy_params)
|
|
710
710
|
self._model_served = True
|
|
711
711
|
self._deploy_params = deploy_params
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
self.autorestart
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
self.autorestart.
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
712
|
+
if self._task_id is not None and is_production():
|
|
713
|
+
try:
|
|
714
|
+
if self.autorestart is None:
|
|
715
|
+
self.autorestart = AutoRestartInfo(self._deploy_params)
|
|
716
|
+
self.api.task.set_fields(self._task_id, self.autorestart.generate_fields())
|
|
717
|
+
logger.debug(
|
|
718
|
+
"Created new autorestart info.",
|
|
719
|
+
extra=self.autorestart.deploy_params,
|
|
720
|
+
)
|
|
721
|
+
elif self.autorestart.is_changed(self._deploy_params):
|
|
722
|
+
self.autorestart.deploy_params.update(self._deploy_params)
|
|
723
|
+
self.api.task.set_fields(self._task_id, self.autorestart.generate_fields())
|
|
724
|
+
logger.debug(
|
|
725
|
+
"Autorestart info is changed. Parameters have been updated.",
|
|
726
|
+
extra=self.autorestart.deploy_params,
|
|
727
|
+
)
|
|
728
|
+
except Exception as e:
|
|
729
|
+
logger.warning(f"Failed to update autorestart info: {repr(e)}")
|
|
729
730
|
if self.gui is not None:
|
|
730
731
|
self.update_gui(self._model_served)
|
|
731
732
|
self.gui.show_deployed_model_info(self)
|
|
@@ -2535,8 +2536,8 @@ class Inference:
|
|
|
2535
2536
|
else:
|
|
2536
2537
|
self._app = Application(layout=self.get_ui())
|
|
2537
2538
|
|
|
2538
|
-
|
|
2539
|
-
|
|
2539
|
+
if self._task_id is not None and is_production():
|
|
2540
|
+
try:
|
|
2540
2541
|
response = self.api.task.get_fields(
|
|
2541
2542
|
self._task_id, [AutoRestartInfo.Fields.AUTO_RESTART_INFO]
|
|
2542
2543
|
)
|
|
@@ -2546,8 +2547,8 @@ class Inference:
|
|
|
2546
2547
|
self._deploy_on_autorestart()
|
|
2547
2548
|
else:
|
|
2548
2549
|
logger.debug("Autorestart info is not set.")
|
|
2549
|
-
|
|
2550
|
-
|
|
2550
|
+
except Exception:
|
|
2551
|
+
logger.error("Autorestart failed.", exc_info=True)
|
|
2551
2552
|
|
|
2552
2553
|
server = self._app.get_server()
|
|
2553
2554
|
self._app.set_ready_check_function(self.is_model_deployed)
|
|
@@ -569,7 +569,7 @@ supervisely/convert/base_converter.py,sha256=O2SP4I_Hd0aSn8kbOUocy8orkc_-iD-TQ-z
|
|
|
569
569
|
supervisely/convert/converter.py,sha256=ymhjzy75bhtpOTJSB7Xfq5tcfZjK_DMxJXIa_uuEitA,10668
|
|
570
570
|
supervisely/convert/image/__init__.py,sha256=JEuyaBiiyiYmEUYqdn8Mog5FVXpz0H1zFubKkOOm73I,1395
|
|
571
571
|
supervisely/convert/image/image_converter.py,sha256=8vak8ZoKTN1ye2ZmCTvCZ605-Rw1AFLIEo7bJMfnR68,10426
|
|
572
|
-
supervisely/convert/image/image_helper.py,sha256=
|
|
572
|
+
supervisely/convert/image/image_helper.py,sha256=j1HqgmCiUIOBft43OkdPSOxQD8aB7zWXPmOXNvzP6j4,3697
|
|
573
573
|
supervisely/convert/image/cityscapes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
574
574
|
supervisely/convert/image/cityscapes/cityscapes_converter.py,sha256=tnelQJHvGz_IGMXWe-EKWAkBhexRzmkv_0Kln5sN12E,8100
|
|
575
575
|
supervisely/convert/image/cityscapes/cityscapes_helper.py,sha256=in5nR7__q_u5dCkVtZmynfZ_ZuvsIAHrTzyTG4EvNgU,2988
|
|
@@ -883,7 +883,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
|
|
|
883
883
|
supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
|
|
884
884
|
supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
|
|
885
885
|
supervisely/nn/inference/cache.py,sha256=LAirR5mFHCtK59EO1lefQ2qhpp0vBvRTH26EVrs13Y0,32073
|
|
886
|
-
supervisely/nn/inference/inference.py,sha256=
|
|
886
|
+
supervisely/nn/inference/inference.py,sha256=qBAItRxn1wZoNxSZNY6bCcaUKwwowFlRaF_z4l-c7TY,169955
|
|
887
887
|
supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
|
|
888
888
|
supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
|
|
889
889
|
supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
|
|
@@ -1082,9 +1082,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1082
1082
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1083
1083
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1084
1084
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1085
|
-
supervisely-6.73.
|
|
1086
|
-
supervisely-6.73.
|
|
1087
|
-
supervisely-6.73.
|
|
1088
|
-
supervisely-6.73.
|
|
1089
|
-
supervisely-6.73.
|
|
1090
|
-
supervisely-6.73.
|
|
1085
|
+
supervisely-6.73.343.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1086
|
+
supervisely-6.73.343.dist-info/METADATA,sha256=w-dMMUc_5PvLFYE4_fw-EfLndQ7kf7Or85jE9JSf2yM,33596
|
|
1087
|
+
supervisely-6.73.343.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1088
|
+
supervisely-6.73.343.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1089
|
+
supervisely-6.73.343.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1090
|
+
supervisely-6.73.343.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|