supervisely 6.73.317__py3-none-any.whl → 6.73.318__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.
@@ -65,6 +65,27 @@ class PersistentImageTTLCache(TTLCache):
65
65
  def __init__(self, maxsize: int, ttl: int, filepath: Path):
66
66
  super().__init__(maxsize, ttl)
67
67
  self._base_dir = filepath
68
+
69
+ def pop(self, *args, **kwargs):
70
+ try:
71
+ super().pop(*args, **kwargs)
72
+ except Exception:
73
+ sly.logger.warn("Cache data corrupted. Cleaning the cache...", exc_info=True)
74
+
75
+ def _delitem(self, key):
76
+ try:
77
+ size = self._Cache__size.pop(key)
78
+ except:
79
+ size = 0
80
+ self._Cache__data.pop(key, None)
81
+ self._Cache__currsize -= size
82
+
83
+ shutil.rmtree(self._base_dir, ignore_errors=True)
84
+ for key in self.keys():
85
+ try:
86
+ super().__delitem__(key, cache_delitem=_delitem)
87
+ except:
88
+ pass
68
89
 
69
90
  def __delitem__(self, key: Any) -> None:
70
91
  self.__del_file(key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.317
3
+ Version: 6.73.318
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -875,7 +875,7 @@ supervisely/nn/benchmark/visualization/widgets/sidebar/sidebar.py,sha256=tKPURRS
875
875
  supervisely/nn/benchmark/visualization/widgets/table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
876
876
  supervisely/nn/benchmark/visualization/widgets/table/table.py,sha256=atmDnF1Af6qLQBUjLhK18RMDKAYlxnsuVHMSEa5a-e8,4319
877
877
  supervisely/nn/inference/__init__.py,sha256=QFukX2ip-U7263aEPCF_UCFwj6EujbMnsgrXp5Bbt8I,1623
878
- supervisely/nn/inference/cache.py,sha256=h-pP_7th0ana3oJ75sFfTbead3hdKUvYA8Iq2OXDx3I,31317
878
+ supervisely/nn/inference/cache.py,sha256=q4F7ZRzZghNWSVFClXEIHNMNW4PK6xddYckCFUgyhCo,32027
879
879
  supervisely/nn/inference/inference.py,sha256=Fq2aMKIxLZwiFXW8a2mfbvW3KXd8O31fccKoKYDvqvQ,158506
880
880
  supervisely/nn/inference/session.py,sha256=jmkkxbe2kH-lEgUU6Afh62jP68dxfhF5v6OGDfLU62E,35757
881
881
  supervisely/nn/inference/video_inference.py,sha256=8Bshjr6rDyLay5Za8IB8Dr6FURMO2R_v7aELasO8pR4,5746
@@ -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.317.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1079
- supervisely-6.73.317.dist-info/METADATA,sha256=fJwJdL1m7GVDWVzkb9Rz9Bqmwzeuis-JwYwvo-ZFZqk,33596
1080
- supervisely-6.73.317.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1081
- supervisely-6.73.317.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1082
- supervisely-6.73.317.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1083
- supervisely-6.73.317.dist-info/RECORD,,
1078
+ supervisely-6.73.318.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1079
+ supervisely-6.73.318.dist-info/METADATA,sha256=BG22_yvudczrZ-0Nq_eCZNa6hM2CocTY3YpADXH47uE,33596
1080
+ supervisely-6.73.318.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1081
+ supervisely-6.73.318.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1082
+ supervisely-6.73.318.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1083
+ supervisely-6.73.318.dist-info/RECORD,,