supervisely 6.73.268__py3-none-any.whl → 6.73.270__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/file_api.py +1 -1
- supervisely/nn/benchmark/utils/semantic_segmentation/evaluator.py +13 -103
- supervisely/nn/inference/inference.py +411 -64
- supervisely/nn/training/gui/gui.py +13 -5
- supervisely/nn/training/gui/training_artifacts.py +121 -51
- supervisely/nn/training/train_app.py +79 -23
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/METADATA +1 -1
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/RECORD +12 -12
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/LICENSE +0 -0
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/WHEEL +0 -0
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.268.dist-info → supervisely-6.73.270.dist-info}/top_level.txt +0 -0
|
@@ -5,6 +5,8 @@ This module provides the `TrainGUI` class that handles the graphical user interf
|
|
|
5
5
|
training workflows in Supervisely.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from os import environ
|
|
9
|
+
|
|
8
10
|
import supervisely.io.env as sly_env
|
|
9
11
|
from supervisely import Api, ProjectMeta
|
|
10
12
|
from supervisely._utils import is_production
|
|
@@ -47,7 +49,6 @@ class TrainGUI:
|
|
|
47
49
|
app_options: dict = None,
|
|
48
50
|
):
|
|
49
51
|
self._api = Api.from_env()
|
|
50
|
-
|
|
51
52
|
if is_production():
|
|
52
53
|
self.task_id = sly_env.task_id()
|
|
53
54
|
else:
|
|
@@ -61,12 +62,19 @@ class TrainGUI:
|
|
|
61
62
|
self.app_options = app_options
|
|
62
63
|
self.collapsable = app_options.get("collapsable", False)
|
|
63
64
|
|
|
64
|
-
self.team_id = sly_env.team_id()
|
|
65
|
-
self.workspace_id = sly_env.workspace_id()
|
|
66
|
-
self.project_id = sly_env.project_id()
|
|
65
|
+
self.team_id = sly_env.team_id(raise_not_found=False)
|
|
66
|
+
self.workspace_id = sly_env.workspace_id(raise_not_found=False)
|
|
67
|
+
self.project_id = sly_env.project_id()
|
|
67
68
|
self.project_info = self._api.project.get_info_by_id(self.project_id)
|
|
68
69
|
self.project_meta = ProjectMeta.from_json(self._api.project.get_meta(self.project_id))
|
|
69
70
|
|
|
71
|
+
if self.workspace_id is None:
|
|
72
|
+
self.workspace_id = self.project_info.workspace_id
|
|
73
|
+
environ["WORKSPACE_ID"] = str(self.workspace_id)
|
|
74
|
+
if self.team_id is None:
|
|
75
|
+
self.team_id = self.project_info.team_id
|
|
76
|
+
environ["TEAM_ID"] = str(self.team_id)
|
|
77
|
+
|
|
70
78
|
# 1. Project selection + Train/val split
|
|
71
79
|
self.input_selector = InputSelector(self.project_info, self.app_options)
|
|
72
80
|
# 2. Select train val splits
|
|
@@ -90,7 +98,7 @@ class TrainGUI:
|
|
|
90
98
|
self.training_logs = TrainingLogs(self.app_options)
|
|
91
99
|
|
|
92
100
|
# 8. Training Artifacts
|
|
93
|
-
self.training_artifacts = TrainingArtifacts(self.app_options)
|
|
101
|
+
self.training_artifacts = TrainingArtifacts(self._api, self.app_options)
|
|
94
102
|
|
|
95
103
|
# Stepper layout
|
|
96
104
|
self.steps = [
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from typing import Any, Dict
|
|
2
3
|
|
|
4
|
+
import supervisely.io.env as sly_env
|
|
3
5
|
from supervisely import Api
|
|
6
|
+
from supervisely._utils import is_production
|
|
7
|
+
from supervisely.api.api import ApiField
|
|
4
8
|
from supervisely.app.widgets import (
|
|
5
9
|
Card,
|
|
6
10
|
Container,
|
|
@@ -11,18 +15,24 @@ from supervisely.app.widgets import (
|
|
|
11
15
|
ReportThumbnail,
|
|
12
16
|
Text,
|
|
13
17
|
)
|
|
18
|
+
from supervisely.io.fs import file_exists
|
|
14
19
|
|
|
15
20
|
PYTORCH_ICON = "https://img.icons8.com/?size=100&id=jH4BpkMnRrU5&format=png&color=000000"
|
|
16
21
|
ONNX_ICON = "https://artwork.lfaidata.foundation/projects/onnx/icon/color/onnx-icon-color.png"
|
|
17
22
|
TRT_ICON = "https://img.icons8.com/?size=100&id=yqf95864UzeQ&format=png&color=000000"
|
|
18
23
|
|
|
24
|
+
OVERVIEW_FILE_NAME = "README.md"
|
|
25
|
+
PYTORCH_FILE_NAME = "demo_pytorch.py"
|
|
26
|
+
ONNX_FILE_NAME = "demo_onnx.py"
|
|
27
|
+
TRT_FILE_NAME = "demo_tensorrt.py"
|
|
28
|
+
|
|
19
29
|
|
|
20
30
|
class TrainingArtifacts:
|
|
21
31
|
title = "Training Artifacts"
|
|
22
32
|
description = "All outputs of the training process will appear here"
|
|
23
33
|
lock_message = "Artifacts will be available after training is completed"
|
|
24
34
|
|
|
25
|
-
def __init__(self, app_options: Dict[str, Any]):
|
|
35
|
+
def __init__(self, api: Api, app_options: Dict[str, Any]):
|
|
26
36
|
self.display_widgets = []
|
|
27
37
|
self.success_message_text = (
|
|
28
38
|
"Training completed. Training artifacts were uploaded to Team Files. "
|
|
@@ -73,59 +83,107 @@ class TrainingArtifacts:
|
|
|
73
83
|
# -------------------------------- #
|
|
74
84
|
|
|
75
85
|
# PyTorch, ONNX, TensorRT demo
|
|
76
|
-
self.
|
|
86
|
+
self.inference_demo_widgets = []
|
|
87
|
+
|
|
77
88
|
model_demo = self.app_options.get("demo", None)
|
|
78
89
|
if model_demo is not None:
|
|
79
|
-
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
onnx_icon = Field.Icon(image_url=ONNX_ICON, bg_color_rgb=[255, 255, 255])
|
|
96
|
-
self.onnx_instruction = Field(
|
|
97
|
-
title="ONNX",
|
|
98
|
-
description="Open file",
|
|
99
|
-
description_url=onnx_demo_link,
|
|
100
|
-
icon=onnx_icon,
|
|
101
|
-
content=Empty(),
|
|
90
|
+
model_demo_path = model_demo.get("path", None)
|
|
91
|
+
if model_demo_path is not None:
|
|
92
|
+
model_demo_gh_link = None
|
|
93
|
+
if is_production():
|
|
94
|
+
task_id = sly_env.task_id()
|
|
95
|
+
task_info = api.task.get_info_by_id(task_id)
|
|
96
|
+
app_id = task_info["meta"]["app"]["id"]
|
|
97
|
+
app_info = api.app.get_info_by_id(app_id)
|
|
98
|
+
model_demo_gh_link = app_info.repo
|
|
99
|
+
else:
|
|
100
|
+
app_name = sly_env.app_name()
|
|
101
|
+
team_id = sly_env.team_id()
|
|
102
|
+
apps = api.app.get_list(
|
|
103
|
+
team_id,
|
|
104
|
+
filter=[{"field": "name", "operator": "=", "value": app_name}],
|
|
105
|
+
only_running=True,
|
|
102
106
|
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
107
|
+
if len(apps) == 1:
|
|
108
|
+
app_info = apps[0]
|
|
109
|
+
model_demo_gh_link = app_info.repo
|
|
110
|
+
|
|
111
|
+
if model_demo_gh_link is not None:
|
|
112
|
+
gh_branch = "blob/main"
|
|
113
|
+
link_to_demo = f"{model_demo_gh_link}/{gh_branch}/{model_demo_path}"
|
|
114
|
+
|
|
115
|
+
if model_demo_gh_link is not None and model_demo_path is not None:
|
|
116
|
+
# PyTorch
|
|
117
|
+
local_pytorch_demo = os.path.join(
|
|
118
|
+
os.getcwd(), model_demo_path, PYTORCH_FILE_NAME
|
|
119
|
+
)
|
|
120
|
+
if file_exists(local_pytorch_demo):
|
|
121
|
+
pytorch_demo_link = f"{link_to_demo}/{PYTORCH_FILE_NAME}"
|
|
122
|
+
pytorch_icon = Field.Icon(
|
|
123
|
+
image_url=PYTORCH_ICON, bg_color_rgb=[255, 255, 255]
|
|
124
|
+
)
|
|
125
|
+
self.pytorch_instruction = Field(
|
|
126
|
+
title="PyTorch",
|
|
127
|
+
description="Open file",
|
|
128
|
+
description_url=pytorch_demo_link,
|
|
129
|
+
icon=pytorch_icon,
|
|
130
|
+
content=Empty(),
|
|
131
|
+
)
|
|
132
|
+
self.pytorch_instruction.hide()
|
|
133
|
+
self.inference_demo_widgets.extend([self.pytorch_instruction])
|
|
134
|
+
|
|
135
|
+
# ONNX
|
|
136
|
+
local_onnx_demo = os.path.join(os.getcwd(), model_demo_path, ONNX_FILE_NAME)
|
|
137
|
+
if file_exists(local_onnx_demo):
|
|
138
|
+
if self.app_options.get("export_onnx_supported", False):
|
|
139
|
+
onnx_demo_link = f"{link_to_demo}/{ONNX_FILE_NAME}"
|
|
140
|
+
onnx_icon = Field.Icon(
|
|
141
|
+
image_url=ONNX_ICON, bg_color_rgb=[255, 255, 255]
|
|
142
|
+
)
|
|
143
|
+
self.onnx_instruction = Field(
|
|
144
|
+
title="ONNX",
|
|
145
|
+
description="Open file",
|
|
146
|
+
description_url=onnx_demo_link,
|
|
147
|
+
icon=onnx_icon,
|
|
148
|
+
content=Empty(),
|
|
149
|
+
)
|
|
150
|
+
self.onnx_instruction.hide()
|
|
151
|
+
self.inference_demo_widgets.extend([self.onnx_instruction])
|
|
152
|
+
|
|
153
|
+
# TensorRT
|
|
154
|
+
local_trt_demo = os.path.join(os.getcwd(), model_demo_path, TRT_FILE_NAME)
|
|
155
|
+
if file_exists(local_trt_demo):
|
|
156
|
+
if self.app_options.get("export_tensorrt_supported", False):
|
|
157
|
+
trt_demo_link = f"{link_to_demo}/{TRT_FILE_NAME}"
|
|
158
|
+
trt_icon = Field.Icon(
|
|
159
|
+
image_url=TRT_ICON, bg_color_rgb=[255, 255, 255]
|
|
160
|
+
)
|
|
161
|
+
self.trt_instruction = Field(
|
|
162
|
+
title="TensorRT",
|
|
163
|
+
description="Open file",
|
|
164
|
+
description_url=trt_demo_link,
|
|
165
|
+
icon=trt_icon,
|
|
166
|
+
content=Empty(),
|
|
167
|
+
)
|
|
168
|
+
self.trt_instruction.hide()
|
|
169
|
+
self.inference_demo_widgets.extend([self.trt_instruction])
|
|
170
|
+
|
|
171
|
+
local_demo_overview = os.path.join(
|
|
172
|
+
os.getcwd(), model_demo_path, OVERVIEW_FILE_NAME
|
|
173
|
+
)
|
|
174
|
+
if file_exists(local_demo_overview):
|
|
175
|
+
demo_overview_link = os.path.join(link_to_demo, OVERVIEW_FILE_NAME)
|
|
176
|
+
else:
|
|
177
|
+
demo_overview_link = None
|
|
178
|
+
|
|
179
|
+
self.inference_demo_field = Field(
|
|
180
|
+
title="How to run inference",
|
|
181
|
+
description="Instructions on how to use your checkpoints outside of Supervisely Platform",
|
|
182
|
+
content=Flexbox(self.inference_demo_widgets),
|
|
183
|
+
title_url=demo_overview_link,
|
|
184
|
+
)
|
|
185
|
+
self.inference_demo_field.hide()
|
|
186
|
+
self.display_widgets.extend([self.inference_demo_field])
|
|
129
187
|
# -------------------------------- #
|
|
130
188
|
|
|
131
189
|
self.container = Container(self.display_widgets)
|
|
@@ -143,3 +201,15 @@ class TrainingArtifacts:
|
|
|
143
201
|
|
|
144
202
|
def validate_step(self) -> bool:
|
|
145
203
|
return True
|
|
204
|
+
|
|
205
|
+
def overview_demo_exists(self, demo_path: str):
|
|
206
|
+
return file_exists(os.path.join(os.getcwd(), demo_path, OVERVIEW_FILE_NAME))
|
|
207
|
+
|
|
208
|
+
def pytorch_demo_exists(self, demo_path: str):
|
|
209
|
+
return file_exists(os.path.join(os.getcwd(), demo_path, PYTORCH_FILE_NAME))
|
|
210
|
+
|
|
211
|
+
def onnx_demo_exists(self, demo_path: str):
|
|
212
|
+
return file_exists(os.path.join(os.getcwd(), demo_path, ONNX_FILE_NAME))
|
|
213
|
+
|
|
214
|
+
def trt_demo_exists(self, demo_path: str):
|
|
215
|
+
return file_exists(os.path.join(os.getcwd(), demo_path, TRT_FILE_NAME))
|
|
@@ -8,7 +8,7 @@ training workflows in a Supervisely application.
|
|
|
8
8
|
import shutil
|
|
9
9
|
import subprocess
|
|
10
10
|
from datetime import datetime
|
|
11
|
-
from os import listdir
|
|
11
|
+
from os import getcwd, listdir
|
|
12
12
|
from os.path import basename, exists, expanduser, isdir, isfile, join
|
|
13
13
|
from typing import Any, Dict, List, Literal, Optional, Union
|
|
14
14
|
from urllib.request import urlopen
|
|
@@ -124,8 +124,6 @@ class TrainApp:
|
|
|
124
124
|
logger.info("TrainApp is running in debug mode")
|
|
125
125
|
|
|
126
126
|
self.framework_name = framework_name
|
|
127
|
-
self._team_id = sly_env.team_id()
|
|
128
|
-
self._workspace_id = sly_env.workspace_id()
|
|
129
127
|
self._tensorboard_process = None
|
|
130
128
|
|
|
131
129
|
self._models = self._load_models(models)
|
|
@@ -249,6 +247,26 @@ class TrainApp:
|
|
|
249
247
|
# ----------------------------------------- #
|
|
250
248
|
|
|
251
249
|
# Input Data
|
|
250
|
+
@property
|
|
251
|
+
def team_id(self) -> int:
|
|
252
|
+
"""
|
|
253
|
+
Returns the ID of the team.
|
|
254
|
+
|
|
255
|
+
:return: Team ID.
|
|
256
|
+
:rtype: int
|
|
257
|
+
"""
|
|
258
|
+
return self.gui.team_id
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def workspace_id(self) -> int:
|
|
262
|
+
"""
|
|
263
|
+
Returns the ID of the workspace.
|
|
264
|
+
|
|
265
|
+
:return: Workspace ID.
|
|
266
|
+
:rtype: int
|
|
267
|
+
"""
|
|
268
|
+
return self.gui.workspace_id
|
|
269
|
+
|
|
252
270
|
@property
|
|
253
271
|
def project_id(self) -> int:
|
|
254
272
|
"""
|
|
@@ -555,6 +573,7 @@ class TrainApp:
|
|
|
555
573
|
self._generate_hyperparameters(remote_dir, experiment_info)
|
|
556
574
|
self._generate_train_val_splits(remote_dir, splits_data)
|
|
557
575
|
self._generate_model_meta(remote_dir, experiment_info)
|
|
576
|
+
self._upload_demo_files(remote_dir)
|
|
558
577
|
|
|
559
578
|
# Step 7. Set output widgets
|
|
560
579
|
self._set_text_status("reset")
|
|
@@ -1074,7 +1093,7 @@ class TrainApp:
|
|
|
1074
1093
|
) as model_download_main_pbar:
|
|
1075
1094
|
self.progress_bar_main.show()
|
|
1076
1095
|
for name, remote_path in remote_paths.items():
|
|
1077
|
-
file_info = self._api.file.get_info_by_path(self.
|
|
1096
|
+
file_info = self._api.file.get_info_by_path(self.team_id, remote_path)
|
|
1078
1097
|
file_name = basename(remote_path)
|
|
1079
1098
|
local_path = join(self.model_dir, file_name)
|
|
1080
1099
|
file_size = file_info.sizeb
|
|
@@ -1087,7 +1106,7 @@ class TrainApp:
|
|
|
1087
1106
|
) as model_download_secondary_pbar:
|
|
1088
1107
|
self.progress_bar_secondary.show()
|
|
1089
1108
|
self._api.file.download(
|
|
1090
|
-
self.
|
|
1109
|
+
self.team_id,
|
|
1091
1110
|
remote_path,
|
|
1092
1111
|
local_path,
|
|
1093
1112
|
progress_cb=model_download_secondary_pbar.update,
|
|
@@ -1325,7 +1344,7 @@ class TrainApp:
|
|
|
1325
1344
|
) as upload_artifacts_pbar:
|
|
1326
1345
|
self.progress_bar_main.show()
|
|
1327
1346
|
self._api.file.upload(
|
|
1328
|
-
self.
|
|
1347
|
+
self.team_id,
|
|
1329
1348
|
local_path,
|
|
1330
1349
|
remote_path,
|
|
1331
1350
|
progress_cb=upload_artifacts_pbar,
|
|
@@ -1421,7 +1440,7 @@ class TrainApp:
|
|
|
1421
1440
|
|
|
1422
1441
|
remote_checkpoints_dir = join(remote_dir, self._remote_checkpoints_dir_name)
|
|
1423
1442
|
checkpoint_files = self._api.file.list(
|
|
1424
|
-
self.
|
|
1443
|
+
self.team_id, remote_checkpoints_dir, return_type="fileinfo"
|
|
1425
1444
|
)
|
|
1426
1445
|
experiment_info["checkpoints"] = [
|
|
1427
1446
|
f"checkpoints/{checkpoint.name}" for checkpoint in checkpoint_files
|
|
@@ -1482,6 +1501,38 @@ class TrainApp:
|
|
|
1482
1501
|
local_path, remote_path, f"Uploading '{self._app_state_file}' to Team Files"
|
|
1483
1502
|
)
|
|
1484
1503
|
|
|
1504
|
+
def _upload_demo_files(self, remote_dir: str) -> None:
|
|
1505
|
+
demo = self._app_options.get("demo")
|
|
1506
|
+
if demo is None:
|
|
1507
|
+
return
|
|
1508
|
+
demo_path = demo.get("path")
|
|
1509
|
+
if demo_path is None:
|
|
1510
|
+
return
|
|
1511
|
+
|
|
1512
|
+
local_demo_dir = join(getcwd(), demo_path)
|
|
1513
|
+
if not sly_fs.dir_exists(local_demo_dir):
|
|
1514
|
+
logger.info(f"Demo directory '{local_demo_dir}' does not exist")
|
|
1515
|
+
return
|
|
1516
|
+
|
|
1517
|
+
logger.debug(f"Uploading demo files to Supervisely")
|
|
1518
|
+
remote_demo_dir = join(remote_dir, "demo")
|
|
1519
|
+
local_files = sly_fs.list_files_recursively(local_demo_dir)
|
|
1520
|
+
total_size = sum([sly_fs.get_file_size(file_path) for file_path in local_files])
|
|
1521
|
+
with self.progress_bar_main(
|
|
1522
|
+
message="Uploading demo files to Team Files",
|
|
1523
|
+
total=total_size,
|
|
1524
|
+
unit="bytes",
|
|
1525
|
+
unit_scale=True,
|
|
1526
|
+
) as upload_artifacts_pbar:
|
|
1527
|
+
self.progress_bar_main.show()
|
|
1528
|
+
remote_dir = self._api.file.upload_directory(
|
|
1529
|
+
self.team_id,
|
|
1530
|
+
local_demo_dir,
|
|
1531
|
+
remote_demo_dir,
|
|
1532
|
+
progress_size_cb=upload_artifacts_pbar,
|
|
1533
|
+
)
|
|
1534
|
+
self.progress_bar_main.hide()
|
|
1535
|
+
|
|
1485
1536
|
def _get_train_val_splits_for_app_state(self) -> Dict:
|
|
1486
1537
|
"""
|
|
1487
1538
|
Gets the train and val splits information for app_state.json.
|
|
@@ -1557,13 +1608,13 @@ class TrainApp:
|
|
|
1557
1608
|
|
|
1558
1609
|
# Clean debug directory if exists
|
|
1559
1610
|
if task_id == "debug-session":
|
|
1560
|
-
if self._api.file.dir_exists(self.
|
|
1611
|
+
if self._api.file.dir_exists(self.team_id, f"{remote_artifacts_dir}/", True):
|
|
1561
1612
|
with self.progress_bar_main(
|
|
1562
1613
|
message=f"[Debug] Cleaning train artifacts: '{remote_artifacts_dir}/'",
|
|
1563
1614
|
total=1,
|
|
1564
1615
|
) as upload_artifacts_pbar:
|
|
1565
1616
|
self.progress_bar_main.show()
|
|
1566
|
-
self._api.file.remove_dir(self.
|
|
1617
|
+
self._api.file.remove_dir(self.team_id, f"{remote_artifacts_dir}", True)
|
|
1567
1618
|
upload_artifacts_pbar.update(1)
|
|
1568
1619
|
self.progress_bar_main.hide()
|
|
1569
1620
|
|
|
@@ -1586,14 +1637,14 @@ class TrainApp:
|
|
|
1586
1637
|
) as upload_artifacts_pbar:
|
|
1587
1638
|
self.progress_bar_main.show()
|
|
1588
1639
|
remote_dir = self._api.file.upload_directory(
|
|
1589
|
-
self.
|
|
1640
|
+
self.team_id,
|
|
1590
1641
|
self.output_dir,
|
|
1591
1642
|
remote_artifacts_dir,
|
|
1592
1643
|
progress_size_cb=upload_artifacts_pbar,
|
|
1593
1644
|
)
|
|
1594
1645
|
self.progress_bar_main.hide()
|
|
1595
1646
|
|
|
1596
|
-
file_info = self._api.file.get_info_by_path(self.
|
|
1647
|
+
file_info = self._api.file.get_info_by_path(self.team_id, join(remote_dir, "open_app.lnk"))
|
|
1597
1648
|
return remote_dir, file_info
|
|
1598
1649
|
|
|
1599
1650
|
def _set_training_output(
|
|
@@ -1629,33 +1680,36 @@ class TrainApp:
|
|
|
1629
1680
|
|
|
1630
1681
|
# Set instruction to GUI
|
|
1631
1682
|
demo_options = self._app_options.get("demo", {})
|
|
1632
|
-
|
|
1683
|
+
demo_path = demo_options.get("path", None)
|
|
1684
|
+
if demo_path is not None:
|
|
1633
1685
|
# Show PyTorch demo if available
|
|
1634
|
-
|
|
1635
|
-
if pytorch_demo:
|
|
1686
|
+
if self.gui.training_artifacts.pytorch_demo_exists(demo_path):
|
|
1636
1687
|
self.gui.training_artifacts.pytorch_instruction.show()
|
|
1637
1688
|
|
|
1638
1689
|
# Show ONNX demo if supported and available
|
|
1639
|
-
onnx_demo = demo_options.get("onnx")
|
|
1640
1690
|
if (
|
|
1641
1691
|
self._app_options.get("export_onnx_supported", False)
|
|
1642
1692
|
and self.gui.hyperparameters_selector.get_export_onnx_checkbox_value()
|
|
1643
|
-
and
|
|
1693
|
+
and self.gui.training_artifacts.onnx_demo_exists(demo_path)
|
|
1644
1694
|
):
|
|
1645
1695
|
self.gui.training_artifacts.onnx_instruction.show()
|
|
1646
1696
|
|
|
1647
1697
|
# Show TensorRT demo if supported and available
|
|
1648
|
-
tensorrt_demo = demo_options.get("tensorrt")
|
|
1649
1698
|
if (
|
|
1650
1699
|
self._app_options.get("export_tensorrt_supported", False)
|
|
1651
1700
|
and self.gui.hyperparameters_selector.get_export_tensorrt_checkbox_value()
|
|
1652
|
-
and
|
|
1701
|
+
and self.gui.training_artifacts.trt_demo_exists(demo_path)
|
|
1653
1702
|
):
|
|
1654
1703
|
self.gui.training_artifacts.trt_instruction.show()
|
|
1655
1704
|
|
|
1656
1705
|
# Show the inference demo widget if overview or any demo is available
|
|
1657
|
-
|
|
1658
|
-
|
|
1706
|
+
if self.gui.training_artifacts.overview_demo_exists(demo_path) or any(
|
|
1707
|
+
[
|
|
1708
|
+
self.gui.training_artifacts.pytorch_demo_exists(demo_path),
|
|
1709
|
+
self.gui.training_artifacts.onnx_demo_exists(demo_path),
|
|
1710
|
+
self.gui.training_artifacts.trt_demo_exists(demo_path),
|
|
1711
|
+
]
|
|
1712
|
+
):
|
|
1659
1713
|
self.gui.training_artifacts.inference_demo_field.show()
|
|
1660
1714
|
# ---------------------------- #
|
|
1661
1715
|
|
|
@@ -1676,7 +1730,7 @@ class TrainApp:
|
|
|
1676
1730
|
eval_res_dir = (
|
|
1677
1731
|
f"/model-benchmark/{self.project_info.id}_{self.project_info.name}/{task_dir}/"
|
|
1678
1732
|
)
|
|
1679
|
-
eval_res_dir = self._api.storage.get_free_dir_name(self.
|
|
1733
|
+
eval_res_dir = self._api.storage.get_free_dir_name(self.team_id, eval_res_dir)
|
|
1680
1734
|
return eval_res_dir
|
|
1681
1735
|
|
|
1682
1736
|
def _run_model_benchmark(
|
|
@@ -1742,6 +1796,8 @@ class TrainApp:
|
|
|
1742
1796
|
use_gui=False,
|
|
1743
1797
|
custom_inference_settings=self._inference_settings,
|
|
1744
1798
|
)
|
|
1799
|
+
if hasattr(m, "in_train"):
|
|
1800
|
+
m.in_train = True
|
|
1745
1801
|
|
|
1746
1802
|
logger.info(f"Using device: {self.device}")
|
|
1747
1803
|
|
|
@@ -1910,7 +1966,7 @@ class TrainApp:
|
|
|
1910
1966
|
|
|
1911
1967
|
if self.model_source == ModelSource.CUSTOM:
|
|
1912
1968
|
file_info = self._api.file.get_info_by_path(
|
|
1913
|
-
self.
|
|
1969
|
+
self.team_id,
|
|
1914
1970
|
self.gui.model_selector.experiment_selector.get_selected_checkpoint_path(),
|
|
1915
1971
|
)
|
|
1916
1972
|
if file_info is not None:
|
|
@@ -2319,7 +2375,7 @@ class TrainApp:
|
|
|
2319
2375
|
self.progress_bar_secondary.show()
|
|
2320
2376
|
destination_path = join(remote_dir, self._export_dir_name, file_name)
|
|
2321
2377
|
self._api.file.upload(
|
|
2322
|
-
self.
|
|
2378
|
+
self.team_id,
|
|
2323
2379
|
path,
|
|
2324
2380
|
destination_path,
|
|
2325
2381
|
export_upload_secondary_pbar,
|
|
@@ -25,7 +25,7 @@ supervisely/api/annotation_api.py,sha256=kB9l0NhQEkunGDC9fWjNzf5DdhqRF1tv-RRnIbk
|
|
|
25
25
|
supervisely/api/api.py,sha256=0dgPx_eizoCEFzfT8YH9uh1kq-OJwjrV5fBGD7uZ7E4,65840
|
|
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=
|
|
28
|
+
supervisely/api/file_api.py,sha256=v2FsD3oljwNPqcDgEJRe8Bu5k0PYKzVhqmRb5QFaHAQ,83422
|
|
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=lLt8z_OE7cXwb94_UKxWiSKxe28a4meMrVM7dhHIWZY,176956
|
|
@@ -832,7 +832,7 @@ supervisely/nn/benchmark/utils/detection/sly2coco.py,sha256=0O2LSCU5zIX34mD4hZIv
|
|
|
832
832
|
supervisely/nn/benchmark/utils/detection/utlis.py,sha256=dKhsOGmQKH20-IlD90DWfZzi171j65N71hNdHRCX5Hs,954
|
|
833
833
|
supervisely/nn/benchmark/utils/semantic_segmentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
834
834
|
supervisely/nn/benchmark/utils/semantic_segmentation/calculate_metrics.py,sha256=4ifC5r_Q880yIr8gWnjEzwKbS0vizMWqSF4XeyaMvh0,924
|
|
835
|
-
supervisely/nn/benchmark/utils/semantic_segmentation/evaluator.py,sha256=
|
|
835
|
+
supervisely/nn/benchmark/utils/semantic_segmentation/evaluator.py,sha256=iPHRo1LLgOzB1S7xD-6ThtoPTQ0tL5Ipu88sZhFMHyM,29261
|
|
836
836
|
supervisely/nn/benchmark/utils/semantic_segmentation/loader.py,sha256=_5ZZ7Nkd8WWYJnKwc1Dx3bEPS_1R84gG_hQc0w0TXWw,1957
|
|
837
837
|
supervisely/nn/benchmark/utils/semantic_segmentation/utils.py,sha256=X5NiR02R-0To2_SuSGHZZccl_-Bupg5F9d7nziIMRMc,3874
|
|
838
838
|
supervisely/nn/benchmark/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -864,7 +864,7 @@ supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8
|
|
|
864
864
|
supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
|
|
865
865
|
supervisely/nn/inference/__init__.py,sha256=mtEci4Puu-fRXDnGn8RP47o97rv3VTE0hjbYO34Zwqg,1622
|
|
866
866
|
supervisely/nn/inference/cache.py,sha256=_pPSpkl8Wkqkiidn0vu6kWE19cngd80av--jncHxMEQ,30510
|
|
867
|
-
supervisely/nn/inference/inference.py,sha256=
|
|
867
|
+
supervisely/nn/inference/inference.py,sha256=HfhfWmmykioE4FIYXZwt1t5HrI9LfPrBAWcRjtQF4yA,143964
|
|
868
868
|
supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
|
|
869
869
|
supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
|
|
870
870
|
supervisely/nn/inference/gui/__init__.py,sha256=wCxd-lF5Zhcwsis-wScDA8n1Gk_1O00PKgDviUZ3F1U,221
|
|
@@ -960,15 +960,15 @@ supervisely/nn/tracker/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
960
960
|
supervisely/nn/tracker/utils/gmc.py,sha256=3JX8979H3NA-YHNaRQyj9Z-xb9qtyMittPEjGw8y2Jo,11557
|
|
961
961
|
supervisely/nn/tracker/utils/kalman_filter.py,sha256=eSFmCjM0mikHCAFvj-KCVzw-0Jxpoc3Cfc2NWEjJC1Q,17268
|
|
962
962
|
supervisely/nn/training/__init__.py,sha256=gY4PCykJ-42MWKsqb9kl-skemKa8yB6t_fb5kzqR66U,111
|
|
963
|
-
supervisely/nn/training/train_app.py,sha256=
|
|
963
|
+
supervisely/nn/training/train_app.py,sha256=wXWQb6Xa49nNHNjCe1YuSur-vHqwjk_J0yoQYCKjHWw,94989
|
|
964
964
|
supervisely/nn/training/gui/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
965
965
|
supervisely/nn/training/gui/classes_selector.py,sha256=8UgzA4aogOAr1s42smwEcDbgaBj_i0JLhjwlZ9bFdIA,3772
|
|
966
|
-
supervisely/nn/training/gui/gui.py,sha256=
|
|
966
|
+
supervisely/nn/training/gui/gui.py,sha256=nj4EVppoV9ZjLN0rVO0GKxmI56d6Qpp0qwnJJ6srT6w,23712
|
|
967
967
|
supervisely/nn/training/gui/hyperparameters_selector.py,sha256=2qryuBss0bLcZJV8PNJ6_hKZM5Dbj2FIxTb3EULHQrE,6670
|
|
968
968
|
supervisely/nn/training/gui/input_selector.py,sha256=Jp9PnVVADv1fhndPuZdMlKuzWTOBQZogrOks5dwATlc,2179
|
|
969
969
|
supervisely/nn/training/gui/model_selector.py,sha256=QTFHMf-8-rREYPk64QKoRvE4zKPC8V6tcP4H4N6nyt0,4082
|
|
970
970
|
supervisely/nn/training/gui/train_val_splits_selector.py,sha256=MLryFD2Tj_RobkFzZOeQXzXpch0eGiVFisq3FGA3dFg,8549
|
|
971
|
-
supervisely/nn/training/gui/training_artifacts.py,sha256
|
|
971
|
+
supervisely/nn/training/gui/training_artifacts.py,sha256=-sJQu5kBaJJp8JhSZzHpQdV4lJFjbd2YOaovbQPyVLM,9583
|
|
972
972
|
supervisely/nn/training/gui/training_logs.py,sha256=1CBqnL0l5kiZVaegJ-NLgOVI1T4EDB_rLAtumuw18Jo,3222
|
|
973
973
|
supervisely/nn/training/gui/training_process.py,sha256=wqlwt1cHG-HoVEOotDiBjp9YTTIbeMr1bHY2zVRaNH8,3071
|
|
974
974
|
supervisely/nn/training/gui/utils.py,sha256=Bi7-BRsAqN7fUkhd7rXVEAqsxhBdIZ2MrrJtrNqVf8I,3905
|
|
@@ -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.270.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1066
|
+
supervisely-6.73.270.dist-info/METADATA,sha256=BGUU7fYyCXsyAzWiPfRU813h4VI_8ckDkmBIRUNHM_I,33573
|
|
1067
|
+
supervisely-6.73.270.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1068
|
+
supervisely-6.73.270.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1069
|
+
supervisely-6.73.270.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1070
|
+
supervisely-6.73.270.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|