supervisely 6.73.239__py3-none-any.whl → 6.73.240__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 +17 -3
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/METADATA +1 -1
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/RECORD +7 -7
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/LICENSE +0 -0
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/WHEEL +0 -0
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.239.dist-info → supervisely-6.73.240.dist-info}/top_level.txt +0 -0
supervisely/api/file_api.py
CHANGED
|
@@ -1056,6 +1056,7 @@ class FileApi(ModuleApiBase):
|
|
|
1056
1056
|
team_id: int,
|
|
1057
1057
|
paths: List[str],
|
|
1058
1058
|
progress_cb: Optional[Union[tqdm, Callable]] = None,
|
|
1059
|
+
batch_size: int = 1000,
|
|
1059
1060
|
) -> None:
|
|
1060
1061
|
"""
|
|
1061
1062
|
Removes list of files from Team Files.
|
|
@@ -1064,6 +1065,10 @@ class FileApi(ModuleApiBase):
|
|
|
1064
1065
|
:type team_id: int
|
|
1065
1066
|
:param paths: List of paths to Files in Team Files.
|
|
1066
1067
|
:type paths: List[str]
|
|
1068
|
+
:param progress_cb: Function for tracking progress.
|
|
1069
|
+
:type progress_cb: tqdm or callable, optional
|
|
1070
|
+
:param batch_size: Number of files to remove in one request. Default is 1000. Maximum is 20000.
|
|
1071
|
+
:type batch_size: int
|
|
1067
1072
|
:return: None
|
|
1068
1073
|
:rtype: :class:`NoneType`
|
|
1069
1074
|
:Usage example:
|
|
@@ -1081,13 +1086,22 @@ class FileApi(ModuleApiBase):
|
|
|
1081
1086
|
"/999_App_Test/ds1/01588.json",
|
|
1082
1087
|
"/999_App_Test/ds1/01587.json"
|
|
1083
1088
|
]
|
|
1084
|
-
api.file.
|
|
1089
|
+
api.file.remove_batch(8, paths_to_del)
|
|
1085
1090
|
"""
|
|
1091
|
+
if batch_size > 20000:
|
|
1092
|
+
logger.warning(
|
|
1093
|
+
"Batch size is more than maximum and automatically reduced to 20000. "
|
|
1094
|
+
"If you get an error, try reducing the batch size."
|
|
1095
|
+
)
|
|
1096
|
+
batch_size = 20000
|
|
1097
|
+
elif batch_size < 100:
|
|
1098
|
+
logger.warning("Batch size is less than minimum and automatically increased to 100.")
|
|
1099
|
+
batch_size = 100
|
|
1086
1100
|
|
|
1087
|
-
for paths_batch in batched(paths, batch_size=
|
|
1101
|
+
for paths_batch in batched(paths, batch_size=batch_size):
|
|
1088
1102
|
for path in paths_batch:
|
|
1089
1103
|
if self.is_on_agent(path) is True:
|
|
1090
|
-
logger.
|
|
1104
|
+
logger.warning(
|
|
1091
1105
|
f"Data '{path}' is on agent. File skipped. Method does not support agent storage. Remove your data manually on the computer with agent."
|
|
1092
1106
|
)
|
|
1093
1107
|
paths_batch.remove(path)
|
|
@@ -25,7 +25,7 @@ supervisely/api/annotation_api.py,sha256=s9kd1G759R8YSvbDcNXrPa9xv95j1cWE1RgD6Xe
|
|
|
25
25
|
supervisely/api/api.py,sha256=SI7DuSi2Jnj5NFS_V9aQ9Sg3CrS97Y5p1pqeeb-4Jb4,64729
|
|
26
26
|
supervisely/api/app_api.py,sha256=-T4sISQ7POyR2yirf1kEWj4JaJFpJxCyRWqbf_99Jak,67036
|
|
27
27
|
supervisely/api/dataset_api.py,sha256=2-SQBlgEnIN-0uvDbtPlSXr6ztBeZ3WPryhkOtpBmk4,40786
|
|
28
|
-
supervisely/api/file_api.py,sha256=
|
|
28
|
+
supervisely/api/file_api.py,sha256=c4iIzH2BF8-GLFLk_wc9Qz225AbHhbzH22wv5HdsGg4,83128
|
|
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=_wXn10tKKCcfvTiQax0O2X9lnE54nXucwQHTjA1WbRM,169172
|
|
@@ -1019,9 +1019,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1019
1019
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1020
1020
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1021
1021
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1022
|
-
supervisely-6.73.
|
|
1023
|
-
supervisely-6.73.
|
|
1024
|
-
supervisely-6.73.
|
|
1025
|
-
supervisely-6.73.
|
|
1026
|
-
supervisely-6.73.
|
|
1027
|
-
supervisely-6.73.
|
|
1022
|
+
supervisely-6.73.240.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1023
|
+
supervisely-6.73.240.dist-info/METADATA,sha256=AIoj0IdizC_kg3QG2ExZsXz19mHqbh7qFPZF7OPO_nY,33277
|
|
1024
|
+
supervisely-6.73.240.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1025
|
+
supervisely-6.73.240.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1026
|
+
supervisely-6.73.240.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1027
|
+
supervisely-6.73.240.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|