Skip to content

Commit 47220b9

Browse files
author
Diego Ardila
committed
Add warning
1 parent c026180 commit 47220b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nucleus/dataset.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
from .payload_constructor import construct_model_run_creation_payload
3131

3232

33+
WARN_FOR_LARGE_UPLOAD = 50000
34+
35+
3336
class Dataset:
3437
"""
3538
Nucleus Dataset. You can append images with metadata to your dataset,
@@ -211,6 +214,11 @@ def append(
211214
"""
212215
check_for_duplicate_reference_ids(dataset_items)
213216

217+
if len(dataset_items) > WARN_FOR_LARGE_UPLOAD and not asynchronous:
218+
print(
219+
"WARNING: for large uploads we recommend uploading your images remotely to a cloud storage provider and then using asynchronous=True."
220+
)
221+
214222
if asynchronous:
215223
check_all_paths_remote(dataset_items)
216224
request_id = serialize_and_write_to_presigned_url(

0 commit comments

Comments
 (0)