Skip to content

Commit 97f6774

Browse files
author
Val Brodsky
committed
PR feedback: misc
1 parent 72dc0ed commit 97f6774

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libs/labelbox/src/labelbox/schema/dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ def create_data_rows(self,
282282
283283
NOTE dicts and strings items can not be mixed in the same call. It is a responsibility of the caller to ensure that all items are of the same type.
284284
"""
285+
286+
if file_upload_thread_count < 1:
287+
raise ValueError(
288+
"file_upload_thread_count must be a positive integer")
289+
285290
string_items = [item for item in items if isinstance(item, str)]
286291
dict_items = [item for item in items if isinstance(item, dict)]
287292
dict_string_items = []

libs/labelbox/tests/integration/test_data_rows.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def test_data_row_bulk_creation(dataset, rand_gen, image_url):
186186
{
187187
"row_data": image_url
188188
},
189-
])
189+
],
190+
file_upload_thread_count=2)
190191
task.wait_till_done()
191192
assert task.has_errors() is False
192193
assert task.status == "COMPLETE"

0 commit comments

Comments
 (0)