supervisely 6.73.201__py3-none-any.whl → 6.73.203__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 +35 -1
- supervisely/app/widgets/fast_table/fast_table.py +3 -3
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/METADATA +1 -1
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/RECORD +8 -8
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/LICENSE +0 -0
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/WHEEL +0 -0
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.201.dist-info → supervisely-6.73.203.dist-info}/top_level.txt +0 -0
supervisely/api/file_api.py
CHANGED
|
@@ -806,6 +806,40 @@ class FileApi(ModuleApiBase):
|
|
|
806
806
|
api.file.upload_bulk(8, src_paths, dst_remote_paths)
|
|
807
807
|
"""
|
|
808
808
|
|
|
809
|
+
def _group_files_generator(
|
|
810
|
+
src_paths: List[str], dst_paths: List[str], limit: int = 20 * 1024 * 1024
|
|
811
|
+
):
|
|
812
|
+
if limit is None:
|
|
813
|
+
return src_paths, dst_paths
|
|
814
|
+
group_src = []
|
|
815
|
+
group_dst = []
|
|
816
|
+
total_size = 0
|
|
817
|
+
for src, dst in zip(src_paths, dst_paths):
|
|
818
|
+
size = os.path.getsize(src)
|
|
819
|
+
if total_size > 0 and total_size + size > limit:
|
|
820
|
+
yield group_src, group_dst
|
|
821
|
+
group_src = []
|
|
822
|
+
group_dst = []
|
|
823
|
+
total_size = 0
|
|
824
|
+
group_src.append(src)
|
|
825
|
+
group_dst.append(dst)
|
|
826
|
+
total_size += size
|
|
827
|
+
if total_size > 0:
|
|
828
|
+
yield group_src, group_dst
|
|
829
|
+
|
|
830
|
+
file_infos = []
|
|
831
|
+
for src, dst in _group_files_generator(src_paths, dst_paths):
|
|
832
|
+
file_infos.extend(self._upload_bulk(team_id, src, dst, progress_cb))
|
|
833
|
+
return file_infos
|
|
834
|
+
|
|
835
|
+
def _upload_bulk(
|
|
836
|
+
self,
|
|
837
|
+
team_id: int,
|
|
838
|
+
src_paths: List[str],
|
|
839
|
+
dst_paths: List[str],
|
|
840
|
+
progress_cb: Optional[Union[tqdm, Callable]] = None,
|
|
841
|
+
) -> List[FileInfo]:
|
|
842
|
+
|
|
809
843
|
def path_to_bytes_stream(path):
|
|
810
844
|
return open(path, "rb")
|
|
811
845
|
|
|
@@ -1338,7 +1372,7 @@ class FileApi(ModuleApiBase):
|
|
|
1338
1372
|
"""
|
|
1339
1373
|
if not remote_dir.startswith("/"):
|
|
1340
1374
|
remote_dir = "/" + remote_dir
|
|
1341
|
-
|
|
1375
|
+
|
|
1342
1376
|
if self.dir_exists(team_id, remote_dir):
|
|
1343
1377
|
if change_name_if_conflict is True:
|
|
1344
1378
|
res_remote_dir = self.get_free_dir_name(team_id, remote_dir)
|
|
@@ -339,7 +339,7 @@ class FastTable(Widget):
|
|
|
339
339
|
if active_page is True:
|
|
340
340
|
temp_parsed_data = [d["items"] for d in self._parsed_active_data["data"]]
|
|
341
341
|
else:
|
|
342
|
-
temp_parsed_data = self._parsed_source_data
|
|
342
|
+
temp_parsed_data = [d["items"] for d in self._parsed_source_data["data"]]
|
|
343
343
|
widget_data = {}
|
|
344
344
|
widget_data["data"] = temp_parsed_data
|
|
345
345
|
widget_data["columns"] = DataJson()[self.widget_id]["columns"]
|
|
@@ -362,7 +362,7 @@ class FastTable(Widget):
|
|
|
362
362
|
if active_page is True:
|
|
363
363
|
temp_parsed_data = [d["items"] for d in self._parsed_active_data["data"]]
|
|
364
364
|
else:
|
|
365
|
-
temp_parsed_data = self._parsed_source_data
|
|
365
|
+
temp_parsed_data = [d["items"] for d in self._parsed_source_data["data"]]
|
|
366
366
|
packed_data = pd.DataFrame(data=temp_parsed_data, columns=self._columns_first_idx)
|
|
367
367
|
return packed_data
|
|
368
368
|
|
|
@@ -792,7 +792,7 @@ class FastTable(Widget):
|
|
|
792
792
|
failed_column_idxs = []
|
|
793
793
|
failed_column_idx = 0
|
|
794
794
|
for column, value in zip(self._source_data.columns, row):
|
|
795
|
-
col_type = type(self._source_data[column][0])
|
|
795
|
+
col_type = type(self._source_data[column].values[0])
|
|
796
796
|
if col_type == str and not isinstance(value, str):
|
|
797
797
|
failed_column_idxs.append(
|
|
798
798
|
{
|
|
@@ -25,7 +25,7 @@ supervisely/api/annotation_api.py,sha256=Eps-Jf10_SQFy7DjghUnyiM6DcVJBsamHDViRAX
|
|
|
25
25
|
supervisely/api/api.py,sha256=u2T0yOQ-tUnP3iIzFu8zEQb4t_EDrXQSKnaXHCvFDyg,36514
|
|
26
26
|
supervisely/api/app_api.py,sha256=zX3Iy16RuGwtcLZfMs3YfUFc93S9AVGb3W_eINeMjOs,66729
|
|
27
27
|
supervisely/api/dataset_api.py,sha256=7iwAyz3pmzFG2i072gLdXjczfBGbyj-V_rRl7Tx-V30,37944
|
|
28
|
-
supervisely/api/file_api.py,sha256=
|
|
28
|
+
supervisely/api/file_api.py,sha256=y8FkE-vx1382cbhNo_rTZs7SobrkxmYQAe79CpvStO4,54279
|
|
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=1AgY6Tk-0rJf1miR5kN1YSkQ7EVihgBnPWbP-Ic55NI,135790
|
|
@@ -247,7 +247,7 @@ supervisely/app/widgets/empty/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
247
247
|
supervisely/app/widgets/empty/empty.py,sha256=fCr8I7CQ2XLo59bl2txjDrblOGiu0TzUcM-Pq6s7gKY,1285
|
|
248
248
|
supervisely/app/widgets/empty/template.html,sha256=aDBKkin5aLuqByzNN517-rTYCGIg5SPKgnysYMPYjv8,40
|
|
249
249
|
supervisely/app/widgets/fast_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
250
|
-
supervisely/app/widgets/fast_table/fast_table.py,sha256
|
|
250
|
+
supervisely/app/widgets/fast_table/fast_table.py,sha256=Sc0tpUEMkfRlwnhPVO91-QqiY18wnzmsUwr6gb0N6YU,33269
|
|
251
251
|
supervisely/app/widgets/fast_table/script.js,sha256=U3lmOucE_IJBuW0n6he1y3um6Ge3vFyhC6gKdmfKxOo,8782
|
|
252
252
|
supervisely/app/widgets/fast_table/style.css,sha256=nr3wUB_n9sjQy_A8D85OIxhC6qX9LcEFaCNljzP6DGQ,15409
|
|
253
253
|
supervisely/app/widgets/fast_table/template.html,sha256=P4mkLysZywc5F_jWuRMzYi89juudGm-6Dh7mo5SsDLo,1060
|
|
@@ -953,9 +953,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
953
953
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
954
954
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
955
955
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
956
|
-
supervisely-6.73.
|
|
957
|
-
supervisely-6.73.
|
|
958
|
-
supervisely-6.73.
|
|
959
|
-
supervisely-6.73.
|
|
960
|
-
supervisely-6.73.
|
|
961
|
-
supervisely-6.73.
|
|
956
|
+
supervisely-6.73.203.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
957
|
+
supervisely-6.73.203.dist-info/METADATA,sha256=lOggtsA5D8nqp79vKNIXej9VBsZ3dev-ofMyXv33JNg,33077
|
|
958
|
+
supervisely-6.73.203.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
959
|
+
supervisely-6.73.203.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
960
|
+
supervisely-6.73.203.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
961
|
+
supervisely-6.73.203.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|