supervisely 6.73.421__py3-none-any.whl → 6.73.423__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.
@@ -169,10 +169,10 @@ class SelectDatasetTree(Widget):
169
169
  for widget in self._widgets:
170
170
  widget.disable()
171
171
 
172
- if hasattr(self, "_select_team"):
172
+ if self._select_team is not None:
173
173
  if not self._team_is_selectable:
174
174
  self._select_team.disable()
175
- if hasattr(self, "_select_workspace"):
175
+ if self._select_workspace is not None:
176
176
  if not self._workspace_is_selectable:
177
177
  self._select_workspace.disable()
178
178
 
@@ -181,10 +181,10 @@ class SelectDatasetTree(Widget):
181
181
  for widget in self._widgets:
182
182
  widget.enable()
183
183
 
184
- if hasattr(self, "_select_team"):
184
+ if self._select_team is not None:
185
185
  if not self._team_is_selectable:
186
186
  self._select_team.disable()
187
- if hasattr(self, "_select_workspace"):
187
+ if self._select_workspace is not None:
188
188
  if not self._workspace_is_selectable:
189
189
  self._select_workspace.disable()
190
190
 
@@ -6,6 +6,7 @@ training workflows in Supervisely.
6
6
  """
7
7
 
8
8
  import os
9
+ import json
9
10
  from os import environ, getenv
10
11
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
11
12
 
@@ -846,16 +847,14 @@ class TrainGUI:
846
847
  }
847
848
  """
848
849
  if isinstance(app_state, str):
849
- app_state = sly_json.load_json_file(app_state)
850
+ if os.path.isfile(app_state):
851
+ app_state = sly_json.load_json_file(app_state)
852
+ else:
853
+ app_state = json.loads(app_state)
850
854
 
851
855
  app_state = self.validate_app_state(app_state)
852
856
  options = app_state.get("options", {})
853
857
 
854
- # Set experiment name
855
- experiment_name = app_state.get("experiment_name")
856
- if experiment_name is not None:
857
- self.training_process.set_experiment_name(experiment_name)
858
-
859
858
  # Run init-steps and stop on validation failure
860
859
  def _run_step(init_fn, settings) -> bool:
861
860
  if not init_fn(settings, options, click_cb, validate_steps):
@@ -881,6 +880,12 @@ class TrainGUI:
881
880
  logger.info(
882
881
  f"Step '{step_name}' {idx}/{len(_steps)} has been validated successfully"
883
882
  )
883
+
884
+ # Set experiment name
885
+ experiment_name = app_state.get("experiment_name")
886
+ if experiment_name is not None:
887
+ self.training_process.set_experiment_name(experiment_name)
888
+
884
889
  if validate_steps:
885
890
  logger.info(f"All steps have been validated successfully")
886
891
  # ------------------------------------------------------------------ #
@@ -990,6 +995,13 @@ class TrainGUI:
990
995
  self.classes_selector.convert_class_shapes_checkbox.check()
991
996
 
992
997
  # Set Classes
998
+ if all(isinstance(c, int) for c in classes_settings):
999
+ project_classes = []
1000
+ for obj_class in self.project_meta.obj_classes:
1001
+ if obj_class.sly_id in classes_settings:
1002
+ project_classes.append(obj_class.name)
1003
+ classes_settings = project_classes
1004
+
993
1005
  self.classes_selector.set_classes(classes_settings)
994
1006
  is_valid = True
995
1007
  if validate:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.421
3
+ Version: 6.73.423
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -457,7 +457,7 @@ supervisely/app/widgets/select_dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
457
457
  supervisely/app/widgets/select_dataset/select_dataset.py,sha256=Y5D1s6x8gupHQ-uReg1XdZbCcTQjLiCBW150OKzC_Zk,10027
458
458
  supervisely/app/widgets/select_dataset/template.html,sha256=7O_ZgmRs0vOL8tng6QvYbI_0o6A4yMAPB2MlfzWHeHQ,984
459
459
  supervisely/app/widgets/select_dataset_tree/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
460
- supervisely/app/widgets/select_dataset_tree/select_dataset_tree.py,sha256=AQA7i7SYeeXR5xXe_pW5DJ83g3O-JOX7Mu6S2MOR_4Y,23172
460
+ supervisely/app/widgets/select_dataset_tree/select_dataset_tree.py,sha256=NjNxDz9E_cgknjulUp46iMv1o01rPl8ihSu8xiwBMus,23172
461
461
  supervisely/app/widgets/select_dataset_tree/template.html,sha256=_uvKCMP0nkpSl3FiTUxqy10JZw3q8-9hXCv22W3BDF0,38
462
462
  supervisely/app/widgets/select_item/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
463
463
  supervisely/app/widgets/select_item/select_item.py,sha256=dcB0UN46rn3nFQybgrGpLRfwB6xnPo-GGrv9rsMeCbA,3833
@@ -1009,7 +1009,7 @@ supervisely/nn/training/__init__.py,sha256=gY4PCykJ-42MWKsqb9kl-skemKa8yB6t_fb5k
1009
1009
  supervisely/nn/training/train_app.py,sha256=dSvXDLpXs726uiCHjQy7KW6XTuwdAapaM720mKsQeNU,131899
1010
1010
  supervisely/nn/training/gui/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
1011
1011
  supervisely/nn/training/gui/classes_selector.py,sha256=tqmVwUfC2u5K53mZmvDvNOhu9Mw5mddjpB2kxRXXUO8,12453
1012
- supervisely/nn/training/gui/gui.py,sha256=uwl6g5ytgs0EcBJDBL3MHBqVVdfZDyuUdybfU2SnjZE,51128
1012
+ supervisely/nn/training/gui/gui.py,sha256=awRPmVItotTIfk0wVtHeiPtD2_bqrX-nHXyngmLJAl0,51574
1013
1013
  supervisely/nn/training/gui/hyperparameters_selector.py,sha256=tEyppV5ay7nECi6qBQ9seKgfidPa_FxxtGmqsfQapa4,7768
1014
1014
  supervisely/nn/training/gui/input_selector.py,sha256=rmirJzpdxuYONI6y5_cvMdGWBJ--T20YTsISghATHu4,2510
1015
1015
  supervisely/nn/training/gui/model_selector.py,sha256=YKBAk6MheulFEl9TF9_mVtE3-Hsc0B3LmeOzMiV6AlQ,7487
@@ -1121,9 +1121,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1121
1121
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1122
1122
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1123
1123
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1124
- supervisely-6.73.421.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1125
- supervisely-6.73.421.dist-info/METADATA,sha256=2XJust39I0iLMkpY98LcsPasNbRsJ3I9A23pkDgZgVg,35433
1126
- supervisely-6.73.421.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1127
- supervisely-6.73.421.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1128
- supervisely-6.73.421.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1129
- supervisely-6.73.421.dist-info/RECORD,,
1124
+ supervisely-6.73.423.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1125
+ supervisely-6.73.423.dist-info/METADATA,sha256=aLMHb353gJH8GuvgmXGd9OvNP65lSBvLYn-eYSBon6s,35433
1126
+ supervisely-6.73.423.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1127
+ supervisely-6.73.423.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1128
+ supervisely-6.73.423.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1129
+ supervisely-6.73.423.dist-info/RECORD,,