supervisely 6.73.305__py3-none-any.whl → 6.73.307__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/api/task_api.py +14 -2
- supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_converter.py +13 -9
- supervisely/nn/inference/inference.py +16 -8
- supervisely/nn/training/train_app.py +1 -1
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/METADATA +1 -1
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/RECORD +10 -10
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/LICENSE +0 -0
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/WHEEL +0 -0
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.305.dist-info → supervisely-6.73.307.dist-info}/top_level.txt +0 -0
supervisely/api/task_api.py
CHANGED
|
@@ -1159,7 +1159,9 @@ class TaskApi(ModuleApiBase, ModuleWithStatus):
|
|
|
1159
1159
|
)
|
|
1160
1160
|
self._api.post("tasks.status.update", {ApiField.ID: task_id, ApiField.STATUS: status})
|
|
1161
1161
|
|
|
1162
|
-
def set_output_experiment(
|
|
1162
|
+
def set_output_experiment(
|
|
1163
|
+
self, task_id: int, experiment_info: dict, project_name: str = None
|
|
1164
|
+
) -> Dict:
|
|
1163
1165
|
"""
|
|
1164
1166
|
Sets output for the task with experiment info.
|
|
1165
1167
|
|
|
@@ -1214,7 +1216,17 @@ class TaskApi(ModuleApiBase, ModuleWithStatus):
|
|
|
1214
1216
|
},
|
|
1215
1217
|
}
|
|
1216
1218
|
"""
|
|
1217
|
-
|
|
1219
|
+
project_id = experiment_info.get("project_id")
|
|
1220
|
+
if project_id is None:
|
|
1221
|
+
raise ValueError("Key 'project_id' is required in experiment_info")
|
|
1222
|
+
if project_name is None:
|
|
1223
|
+
project = self._api.project.get_info_by_id(project_id, raise_error=True)
|
|
1224
|
+
project_name = project.name
|
|
1225
|
+
|
|
1226
|
+
output = {
|
|
1227
|
+
ApiField.PROJECT: {ApiField.ID: project_id, ApiField.TITLE: project_name},
|
|
1228
|
+
ApiField.EXPERIMENT: {ApiField.DATA: {**experiment_info}},
|
|
1229
|
+
}
|
|
1218
1230
|
resp = self._api.post(
|
|
1219
1231
|
"tasks.output.set", {ApiField.TASK_ID: task_id, ApiField.OUTPUT: output}
|
|
1220
1232
|
)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from os import path as osp
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from typing import Dict, Optional
|
|
@@ -60,19 +61,22 @@ class NuscenesEpisodesConverter(PointcloudEpisodeConverter):
|
|
|
60
61
|
logger.warning("Please, run 'pip install nuscenes-devkit' to import NuScenes data.")
|
|
61
62
|
return False
|
|
62
63
|
|
|
63
|
-
def
|
|
64
|
-
return all(
|
|
64
|
+
def _contains_tables(p):
|
|
65
|
+
return all(fs.file_exists(Path(p) / f"{name}.json") for name in helpers.TABLE_NAMES)
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
def _filter_fn(path):
|
|
68
|
+
has_tables = False
|
|
69
|
+
for p in os.scandir(path):
|
|
70
|
+
if p.is_dir() and _contains_tables(p.path):
|
|
71
|
+
has_tables = True
|
|
72
|
+
break
|
|
73
|
+
return has_tables and (Path(path) / "samples").exists()
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
if
|
|
75
|
+
input_path = next((d for d in fs.dirs_filter(self._input_data, _filter_fn)), None)
|
|
76
|
+
if input_path is None:
|
|
72
77
|
return False
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
ann_dir = next((d for d in fs.dirs_filter(input_path, fil_fn)), None)
|
|
79
|
+
ann_dir = next((d for d in fs.dirs_filter(input_path, _contains_tables)), None)
|
|
76
80
|
if ann_dir is None:
|
|
77
81
|
return False
|
|
78
82
|
|
|
@@ -785,9 +785,11 @@ class Inference:
|
|
|
785
785
|
checkpoint_file_path = os.path.join(
|
|
786
786
|
model_info.get("artifacts_dir"), "checkpoints", checkpoint_name
|
|
787
787
|
)
|
|
788
|
-
checkpoint_file_info =
|
|
789
|
-
|
|
790
|
-
|
|
788
|
+
checkpoint_file_info = None
|
|
789
|
+
if not self._is_local_deploy:
|
|
790
|
+
checkpoint_file_info = self.api.file.get_info_by_path(
|
|
791
|
+
sly_env.team_id(), checkpoint_file_path
|
|
792
|
+
)
|
|
791
793
|
if checkpoint_file_info is None:
|
|
792
794
|
checkpoint_url = None
|
|
793
795
|
else:
|
|
@@ -2413,6 +2415,7 @@ class Inference:
|
|
|
2413
2415
|
self._inference_by_local_deploy_args()
|
|
2414
2416
|
# Gracefully shut down the server
|
|
2415
2417
|
self._app.shutdown()
|
|
2418
|
+
exit(0)
|
|
2416
2419
|
# else: run server after endpoints
|
|
2417
2420
|
|
|
2418
2421
|
@call_on_autostart()
|
|
@@ -3017,6 +3020,8 @@ class Inference:
|
|
|
3017
3020
|
def _load_experiment_info(artifacts_dir):
|
|
3018
3021
|
experiment_path = os.path.join(artifacts_dir, "experiment_info.json")
|
|
3019
3022
|
model_info = self._load_json_file(experiment_path)
|
|
3023
|
+
model_meta_path = os.path.join(artifacts_dir, "model_meta.json")
|
|
3024
|
+
model_info["model_meta"] = self._load_json_file(model_meta_path)
|
|
3020
3025
|
original_model_files = model_info.get("model_files")
|
|
3021
3026
|
if not original_model_files:
|
|
3022
3027
|
raise ValueError("Invalid 'experiment_info.json'. Missing 'model_files' key.")
|
|
@@ -3106,7 +3111,7 @@ class Inference:
|
|
|
3106
3111
|
"runtime": runtime,
|
|
3107
3112
|
}
|
|
3108
3113
|
|
|
3109
|
-
logger.
|
|
3114
|
+
logger.debug(f"Deploy parameters: {deploy_params}")
|
|
3110
3115
|
return deploy_params, need_download
|
|
3111
3116
|
|
|
3112
3117
|
def _run_server(self):
|
|
@@ -3151,14 +3156,17 @@ class Inference:
|
|
|
3151
3156
|
ann = predict_image_np(image_np)
|
|
3152
3157
|
api.annotation.upload_ann(image, ann)
|
|
3153
3158
|
elif isinstance(image, str):
|
|
3154
|
-
if sly_fs.file_exists(self._args.
|
|
3155
|
-
image_np = sly_image.read(self._args.
|
|
3159
|
+
if sly_fs.file_exists(self._args.predict_image):
|
|
3160
|
+
image_np = sly_image.read(self._args.predict_image)
|
|
3156
3161
|
ann = predict_image_np(image_np)
|
|
3157
3162
|
pred_ann_path = image + ".json"
|
|
3158
3163
|
sly_json.dump_json_file(ann.to_json(), pred_ann_path)
|
|
3159
|
-
# Save image for debug
|
|
3164
|
+
# Save image and ann for debug
|
|
3160
3165
|
# ann.draw_pretty(image_np)
|
|
3161
|
-
# pred_path = os.path.join(
|
|
3166
|
+
# pred_path = os.path.join(
|
|
3167
|
+
# os.path.dirname(self._args.predict_image),
|
|
3168
|
+
# "pred_" + os.path.basename(self._args.predict_image),
|
|
3169
|
+
# )
|
|
3162
3170
|
# sly_image.write(pred_path, image_np)
|
|
3163
3171
|
|
|
3164
3172
|
if self._args.predict_project is not None:
|
|
@@ -1759,7 +1759,7 @@ class TrainApp:
|
|
|
1759
1759
|
# self.gui.training_logs.tensorboard_button.disable()
|
|
1760
1760
|
|
|
1761
1761
|
# Set artifacts to GUI
|
|
1762
|
-
self._api.task.set_output_experiment(self.task_id, experiment_info)
|
|
1762
|
+
self._api.task.set_output_experiment(self.task_id, experiment_info, self.project_name)
|
|
1763
1763
|
set_directory(remote_dir)
|
|
1764
1764
|
self.gui.training_artifacts.artifacts_thumbnail.set(file_info)
|
|
1765
1765
|
self.gui.training_artifacts.artifacts_thumbnail.show()
|
|
@@ -42,7 +42,7 @@ supervisely/api/remote_storage_api.py,sha256=qTuPhPsstgEjRm1g-ZInddik8BNC_38YvBB
|
|
|
42
42
|
supervisely/api/report_api.py,sha256=Om7CGulUbQ4BuJ16eDtz7luLe0JQNqab-LoLpUXu7YE,7123
|
|
43
43
|
supervisely/api/role_api.py,sha256=aBL4mxtn08LDPXQuS153-lQFN6N2kcwiz8MbescZ8Gk,3044
|
|
44
44
|
supervisely/api/storage_api.py,sha256=FPGYf3Rn3LBoe38RBNdoiURs306oshzvKOEOQ56XAbs,13030
|
|
45
|
-
supervisely/api/task_api.py,sha256=
|
|
45
|
+
supervisely/api/task_api.py,sha256=1xbKi6JYl8FOHno2GoE224ZiQBXdKGR4Sz5uP9LElyE,54085
|
|
46
46
|
supervisely/api/team_api.py,sha256=bEoz3mrykvliLhKnzEy52vzdd_H8VBJCpxF-Bnek9Q8,19467
|
|
47
47
|
supervisely/api/user_api.py,sha256=4S97yIc6AMTZCa0N57lzETnpIE8CeqClvCb6kjUkgfc,24940
|
|
48
48
|
supervisely/api/video_annotation_tool_api.py,sha256=3A9-U8WJzrTShP_n9T8U01M9FzGYdeS51CCBTzUnooo,6686
|
|
@@ -641,7 +641,7 @@ supervisely/convert/pointcloud_episodes/bag/bag_converter.py,sha256=jzWKXoFUWu11
|
|
|
641
641
|
supervisely/convert/pointcloud_episodes/lyft/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
642
642
|
supervisely/convert/pointcloud_episodes/lyft/lyft_converter.py,sha256=QXreWUJ-QhoWgLPqRxCayatYCCCuSV6Z2XCZKScrD3o,10419
|
|
643
643
|
supervisely/convert/pointcloud_episodes/nuscenes_conv/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
644
|
-
supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_converter.py,sha256=
|
|
644
|
+
supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_converter.py,sha256=O8QIwqwb0DUuYmS8oq6kGv3uTlzS3GyGvAxfL1bYW-s,12764
|
|
645
645
|
supervisely/convert/pointcloud_episodes/nuscenes_conv/nuscenes_helper.py,sha256=cJTwhFn1JgblbPjrTrZu30y6FxyjGF-12sMFfvN1xzM,8969
|
|
646
646
|
supervisely/convert/pointcloud_episodes/sly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
647
647
|
supervisely/convert/pointcloud_episodes/sly/sly_pointcloud_episodes_converter.py,sha256=fSEGxuTtFTAOLNBAZncOxw9PVALBOtB7yZ8qTCaET7w,6102
|
|
@@ -875,7 +875,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
|
|
|
875
875
|
supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
|
|
876
876
|
supervisely/nn/inference/__init__.py,sha256=mtEci4Puu-fRXDnGn8RP47o97rv3VTE0hjbYO34Zwqg,1622
|
|
877
877
|
supervisely/nn/inference/cache.py,sha256=h-pP_7th0ana3oJ75sFfTbead3hdKUvYA8Iq2OXDx3I,31317
|
|
878
|
-
supervisely/nn/inference/inference.py,sha256
|
|
878
|
+
supervisely/nn/inference/inference.py,sha256=WIFVWA-x5RtcIhpq_9I0XjOeQfP32V5Ef1-cL8YyNJ8,148722
|
|
879
879
|
supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
|
|
880
880
|
supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
|
|
881
881
|
supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
|
|
@@ -972,7 +972,7 @@ supervisely/nn/tracker/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
972
972
|
supervisely/nn/tracker/utils/gmc.py,sha256=3JX8979H3NA-YHNaRQyj9Z-xb9qtyMittPEjGw8y2Jo,11557
|
|
973
973
|
supervisely/nn/tracker/utils/kalman_filter.py,sha256=eSFmCjM0mikHCAFvj-KCVzw-0Jxpoc3Cfc2NWEjJC1Q,17268
|
|
974
974
|
supervisely/nn/training/__init__.py,sha256=gY4PCykJ-42MWKsqb9kl-skemKa8yB6t_fb5kzqR66U,111
|
|
975
|
-
supervisely/nn/training/train_app.py,sha256=
|
|
975
|
+
supervisely/nn/training/train_app.py,sha256=6bbmj4d2uemKMnv2u5d-2Wp6RFOQl3COl3CgwC6-Gqs,103966
|
|
976
976
|
supervisely/nn/training/gui/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
977
977
|
supervisely/nn/training/gui/classes_selector.py,sha256=8UgzA4aogOAr1s42smwEcDbgaBj_i0JLhjwlZ9bFdIA,3772
|
|
978
978
|
supervisely/nn/training/gui/gui.py,sha256=CnT_QhihrxdSHKybpI0pXhPLwCaXEana_qdn0DhXByg,25558
|
|
@@ -1074,9 +1074,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1074
1074
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1075
1075
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1076
1076
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1077
|
-
supervisely-6.73.
|
|
1078
|
-
supervisely-6.73.
|
|
1079
|
-
supervisely-6.73.
|
|
1080
|
-
supervisely-6.73.
|
|
1081
|
-
supervisely-6.73.
|
|
1082
|
-
supervisely-6.73.
|
|
1077
|
+
supervisely-6.73.307.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1078
|
+
supervisely-6.73.307.dist-info/METADATA,sha256=cAJxuLzG815JpY_UwjFG3soVNxtAiUo89L7wcISLSDY,33573
|
|
1079
|
+
supervisely-6.73.307.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1080
|
+
supervisely-6.73.307.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1081
|
+
supervisely-6.73.307.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1082
|
+
supervisely-6.73.307.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|