supervisely 6.73.308__py3-none-any.whl → 6.73.310__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/annotation/tag_meta.py +8 -2
- supervisely/api/project_api.py +6 -1
- supervisely/app/fastapi/subapp.py +19 -0
- supervisely/project/project.py +30 -4
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/METADATA +2 -1
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/RECORD +10 -10
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/LICENSE +0 -0
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/WHEEL +0 -0
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.308.dist-info → supervisely-6.73.310.dist-info}/top_level.txt +0 -0
|
@@ -176,7 +176,7 @@ class TagMeta(KeyObject, JsonSerializable):
|
|
|
176
176
|
self._applicable_to, SUPPORTED_APPLICABLE_TO
|
|
177
177
|
)
|
|
178
178
|
)
|
|
179
|
-
|
|
179
|
+
|
|
180
180
|
if self._target_type not in SUPPORTED_TARGET_TYPES:
|
|
181
181
|
raise ValueError(
|
|
182
182
|
"target_type = {!r} is unknown, should be one of {}".format(
|
|
@@ -362,7 +362,7 @@ class TagMeta(KeyObject, JsonSerializable):
|
|
|
362
362
|
# Output: ['car', 'bicycle']
|
|
363
363
|
"""
|
|
364
364
|
return self._applicable_classes
|
|
365
|
-
|
|
365
|
+
|
|
366
366
|
@property
|
|
367
367
|
def target_type(self) -> str:
|
|
368
368
|
"""
|
|
@@ -430,6 +430,12 @@ class TagMeta(KeyObject, JsonSerializable):
|
|
|
430
430
|
TagMetaJsonFields.VALUE_TYPE: self.value_type,
|
|
431
431
|
TagMetaJsonFields.COLOR: rgb2hex(self.color),
|
|
432
432
|
}
|
|
433
|
+
|
|
434
|
+
#! fix for the issue with the default value of the target_type
|
|
435
|
+
#! while restoring Data Version with old class definitions
|
|
436
|
+
if not hasattr(self, "_target_type"):
|
|
437
|
+
self._target_type = TagTargetType.ALL
|
|
438
|
+
|
|
433
439
|
if self.value_type == TagValueType.ONEOF_STRING:
|
|
434
440
|
jdict[TagMetaJsonFields.VALUES] = self.possible_values
|
|
435
441
|
|
supervisely/api/project_api.py
CHANGED
|
@@ -1799,7 +1799,12 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
|
|
|
1799
1799
|
self.update_meta(id, meta)
|
|
1800
1800
|
|
|
1801
1801
|
def _set_custom_grouping_settings(
|
|
1802
|
-
self,
|
|
1802
|
+
self,
|
|
1803
|
+
id: int,
|
|
1804
|
+
group_images: bool,
|
|
1805
|
+
tag_name: str,
|
|
1806
|
+
sync: bool,
|
|
1807
|
+
label_group_tag_name: str = None,
|
|
1803
1808
|
) -> None:
|
|
1804
1809
|
"""Sets the project settings for custom grouping.
|
|
1805
1810
|
|
|
@@ -812,6 +812,25 @@ def _init(
|
|
|
812
812
|
response = await process_server_error(request, exc, need_to_handle_error)
|
|
813
813
|
return response
|
|
814
814
|
|
|
815
|
+
def verify_localhost(request: Request):
|
|
816
|
+
client_host = request.client.host
|
|
817
|
+
if client_host not in ["127.0.0.1", "::1"]:
|
|
818
|
+
raise HTTPException(status_code=404, detail="Not Found")
|
|
819
|
+
|
|
820
|
+
@app.post("/debug", dependencies=[Depends(verify_localhost)])
|
|
821
|
+
def start_debug():
|
|
822
|
+
import debugpy
|
|
823
|
+
|
|
824
|
+
debug_host = os.getenv("DEBUG_HOST", "127.0.0.1")
|
|
825
|
+
debug_port = int(os.getenv("DEBUG_PORT", "5678"))
|
|
826
|
+
debugpy.listen((debug_host, debug_port))
|
|
827
|
+
return {
|
|
828
|
+
"status": "success",
|
|
829
|
+
"message": f"Debug server is listening on {debug_host}:{debug_port}",
|
|
830
|
+
"host": debug_host,
|
|
831
|
+
"port": debug_port,
|
|
832
|
+
}
|
|
833
|
+
|
|
815
834
|
if headless is False:
|
|
816
835
|
app.cached_template = None
|
|
817
836
|
|
supervisely/project/project.py
CHANGED
|
@@ -71,6 +71,31 @@ from supervisely.sly_logger import logger
|
|
|
71
71
|
from supervisely.task.progress import Progress, tqdm_sly
|
|
72
72
|
|
|
73
73
|
|
|
74
|
+
class CustomUnpickler(pickle.Unpickler):
|
|
75
|
+
"""
|
|
76
|
+
Custom Unpickler to load pickled objects with fields that are not present in the class definition.
|
|
77
|
+
Used to load old pickled objects that have been pickled with a class that has been updated.
|
|
78
|
+
Supports loading namedtuple objects with missing fields.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
def find_class(self, module, name):
|
|
82
|
+
cls = super().find_class(module, name)
|
|
83
|
+
if hasattr(cls, "_fields"):
|
|
84
|
+
orig_new = cls.__new__
|
|
85
|
+
|
|
86
|
+
def new(cls, *args, **kwargs):
|
|
87
|
+
if len(args) < len(cls._fields):
|
|
88
|
+
# Set missed attrs to None
|
|
89
|
+
args = list(args) + [None] * (len(cls._fields) - len(args))
|
|
90
|
+
return orig_new(cls, *args, **kwargs)
|
|
91
|
+
|
|
92
|
+
# Create a new class dynamically
|
|
93
|
+
NewCls = type(f"Pickled{cls.__name__}", (cls,), {"__new__": new})
|
|
94
|
+
return NewCls
|
|
95
|
+
|
|
96
|
+
return cls
|
|
97
|
+
|
|
98
|
+
|
|
74
99
|
# @TODO: rename img_path to item_path (maybe convert namedtuple to class and create fields and props)
|
|
75
100
|
class ItemPaths(NamedTuple):
|
|
76
101
|
#: :class:`str`: Full image file path of item
|
|
@@ -3289,10 +3314,10 @@ class Project:
|
|
|
3289
3314
|
figures: Dict[int, List[sly.FigureInfo]] # image_id: List of figure_infos
|
|
3290
3315
|
alpha_geometries: Dict[int, List[dict]] # figure_id: List of geometries
|
|
3291
3316
|
with file if isinstance(file, io.BytesIO) else open(file, "rb") as f:
|
|
3292
|
-
|
|
3293
|
-
|
|
3317
|
+
unpickler = CustomUnpickler(f)
|
|
3318
|
+
project_info, meta, dataset_infos, image_infos, figures, alpha_geometries = (
|
|
3319
|
+
unpickler.load()
|
|
3294
3320
|
)
|
|
3295
|
-
|
|
3296
3321
|
if project_name is None:
|
|
3297
3322
|
project_name = project_info.name
|
|
3298
3323
|
new_project_info = api.project.create(
|
|
@@ -3354,7 +3379,8 @@ class Project:
|
|
|
3354
3379
|
)
|
|
3355
3380
|
workspace_info = api.workspace.get_info_by_id(workspace_id)
|
|
3356
3381
|
existing_links = api.image.check_existing_links(
|
|
3357
|
-
list(set([inf.link for inf in image_infos if inf.link])),
|
|
3382
|
+
list(set([inf.link for inf in image_infos if inf.link])),
|
|
3383
|
+
team_id=workspace_info.team_id,
|
|
3358
3384
|
)
|
|
3359
3385
|
image_infos = sorted(image_infos, key=lambda info: info.link is not None)
|
|
3360
3386
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: supervisely
|
|
3
|
-
Version: 6.73.
|
|
3
|
+
Version: 6.73.310
|
|
4
4
|
Summary: Supervisely Python SDK.
|
|
5
5
|
Home-page: https://github.com/supervisely/supervisely
|
|
6
6
|
Author: Supervisely
|
|
@@ -70,6 +70,7 @@ Requires-Dist: pyjwt<3.0.0,>=2.1.0
|
|
|
70
70
|
Requires-Dist: zstd
|
|
71
71
|
Requires-Dist: aiofiles
|
|
72
72
|
Requires-Dist: httpx[http2]==0.27.2
|
|
73
|
+
Requires-Dist: debugpy
|
|
73
74
|
Provides-Extra: apps
|
|
74
75
|
Requires-Dist: uvicorn[standard]<1.0.0,>=0.18.2; extra == "apps"
|
|
75
76
|
Requires-Dist: fastapi<1.0.0,>=0.79.0; extra == "apps"
|
|
@@ -15,7 +15,7 @@ supervisely/annotation/obj_class_mapper.py,sha256=aIJDoRULqcAOD2a1CQPk2OOF8k3VPP
|
|
|
15
15
|
supervisely/annotation/renamer.py,sha256=rVvNLtpfd1kKUVPgm8VlLmYSDByWjriJ92FobC4buqY,1944
|
|
16
16
|
supervisely/annotation/tag.py,sha256=m_sPgrr_ZW8HuiK7Fr2-WnHwKwez1WZtGrcdZN2DZuQ,17598
|
|
17
17
|
supervisely/annotation/tag_collection.py,sha256=MVPTzer9rLpD4O0g2XhYFUheK7-ILgwAXDJd1em3kZ8,10015
|
|
18
|
-
supervisely/annotation/tag_meta.py,sha256=
|
|
18
|
+
supervisely/annotation/tag_meta.py,sha256=nTRKVuW_h6mGdTxuwXvtR2ERhwOvjjdUf635ONLFFx8,27767
|
|
19
19
|
supervisely/annotation/tag_meta_collection.py,sha256=JY2wAo4dF47UylYeglkJtRtpVOArGjf3dXeEYIHFWP0,14491
|
|
20
20
|
supervisely/annotation/tag_meta_mapper.py,sha256=RWeTrxJ64syodyhXIRSH007bX6Hr3B45tG14YTcpwSU,1639
|
|
21
21
|
supervisely/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -36,7 +36,7 @@ supervisely/api/module_api.py,sha256=06YJ-LsDDEAIZTnoexqcUilgT3VBDw-I0b4h_bQnCO0
|
|
|
36
36
|
supervisely/api/neural_network_api.py,sha256=ktPVRO4Jeulougio8F0mioJJHwRJcX250Djp1wBoQ9c,7620
|
|
37
37
|
supervisely/api/object_class_api.py,sha256=-rQcKwhBw3iL9KNH9c1ROgoimgWM1ls6Wi_tb1R-MzY,7683
|
|
38
38
|
supervisely/api/plugin_api.py,sha256=TlfrosdRuYG4NUxk92QiQoVaOdztFspPpygyVa3M3zk,5283
|
|
39
|
-
supervisely/api/project_api.py,sha256=
|
|
39
|
+
supervisely/api/project_api.py,sha256=WwpwzsQjue2276Rn_wkcPxJAM4OaQr6haf81ZmCGpBI,79992
|
|
40
40
|
supervisely/api/project_class_api.py,sha256=5cyjdGPPb2tpttu5WmYoOxUNiDxqiojschkhZumF0KM,1426
|
|
41
41
|
supervisely/api/remote_storage_api.py,sha256=qTuPhPsstgEjRm1g-ZInddik8BNC_38YvBBPvgmim6U,17790
|
|
42
42
|
supervisely/api/report_api.py,sha256=Om7CGulUbQ4BuJ16eDtz7luLe0JQNqab-LoLpUXu7YE,7123
|
|
@@ -93,7 +93,7 @@ supervisely/app/fastapi/index.html,sha256=6K8akK7_k9Au-BpZ7cM2qocuiegLdXz8UFPnWg
|
|
|
93
93
|
supervisely/app/fastapi/no_html_main.html,sha256=NhQP7noyORBx72lFh1CQKgBRupkWjiq6Gaw-9Hkvg7c,37
|
|
94
94
|
supervisely/app/fastapi/offline.py,sha256=CwMMkJ1frD6wiZS-SEoNDtQ1UJcJe1Ob6ohE3r4CQL8,7414
|
|
95
95
|
supervisely/app/fastapi/request.py,sha256=NU7rKmxJ1pfkDZ7_yHckRcRAueJRQIqCor11UO2OHr8,766
|
|
96
|
-
supervisely/app/fastapi/subapp.py,sha256=
|
|
96
|
+
supervisely/app/fastapi/subapp.py,sha256=uKk5epRbwlhl7ue1-OYKUC6oJ9krJ9hIEHEcFqNVdXI,44757
|
|
97
97
|
supervisely/app/fastapi/templating.py,sha256=JOAW8U-14GD47E286mzFi3mZSPbm_csJGqtXWLRM4rc,2929
|
|
98
98
|
supervisely/app/fastapi/utils.py,sha256=GZuTWLcVRGVx8TL3jVEYUOZIT2FawbwIe2kAOBLw9ho,398
|
|
99
99
|
supervisely/app/fastapi/websocket.py,sha256=TlRSPOAhRItTv1HGvdukK1ZvhRjMUxRa-lJlsRR9rJw,1308
|
|
@@ -1013,7 +1013,7 @@ supervisely/project/data_version.py,sha256=nknaWJSUCwoDyNG9_d1KA-GjzidhV9zd9Cn8c
|
|
|
1013
1013
|
supervisely/project/download.py,sha256=zb8sb4XZ6Qi3CP7fmtLRUAYzaxs_W0WnOfe2x3ZVRMs,24639
|
|
1014
1014
|
supervisely/project/pointcloud_episode_project.py,sha256=yiWdNBQiI6f1O9sr1pg8JHW6O-w3XUB1rikJNn3Oung,41866
|
|
1015
1015
|
supervisely/project/pointcloud_project.py,sha256=Kx1Vaes-krwG3BiRRtHRLQxb9G5m5bTHPN9IzRqmNWo,49399
|
|
1016
|
-
supervisely/project/project.py,sha256=
|
|
1016
|
+
supervisely/project/project.py,sha256=LHsrMBbMxdMynhuS0RhjiRFxnzikj6esyKFfR8kEZ9Q,203388
|
|
1017
1017
|
supervisely/project/project_meta.py,sha256=26s8IiHC5Pg8B1AQi6_CrsWteioJP2in00cRNe8QlW0,51423
|
|
1018
1018
|
supervisely/project/project_settings.py,sha256=NLThzU_DCynOK6hkHhVdFyezwprn9UqlnrLDe_3qhkY,9347
|
|
1019
1019
|
supervisely/project/project_type.py,sha256=EZDJFRi4MmC_5epYexBgML5WMZsWdEVk_CjqDQy5m3c,572
|
|
@@ -1075,9 +1075,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1075
1075
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1076
1076
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1077
1077
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1078
|
-
supervisely-6.73.
|
|
1079
|
-
supervisely-6.73.
|
|
1080
|
-
supervisely-6.73.
|
|
1081
|
-
supervisely-6.73.
|
|
1082
|
-
supervisely-6.73.
|
|
1083
|
-
supervisely-6.73.
|
|
1078
|
+
supervisely-6.73.310.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1079
|
+
supervisely-6.73.310.dist-info/METADATA,sha256=DKjhQeBTWjIX--CIzWMMT8aSbzyDbtWOjezUpfWW5CM,33596
|
|
1080
|
+
supervisely-6.73.310.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1081
|
+
supervisely-6.73.310.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1082
|
+
supervisely-6.73.310.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1083
|
+
supervisely-6.73.310.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|