Skip to content

Commit b2882ed

Browse files
author
Kevin Kim
committed
Fix limits to 150,000
1 parent 716d336 commit b2882ed

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

labelbox/schema/dataset.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323

2424
logger = logging.getLogger(__name__)
2525

26-
MAX_DATAROW_PER_API_OPERATION = 1000000
27-
MAX_DATAROW_WITH_METADATA = 1000000
26+
MAX_DATAROW_PER_API_OPERATION = 150_000
2827

2928

3029
class Dataset(DbObject, Updateable, Deletable):
@@ -426,15 +425,6 @@ def convert_item(item):
426425
f"Cannot create more than {MAX_DATAROW_PER_API_OPERATION} DataRows per function call."
427426
)
428427

429-
# TODO: If any datarows contain metadata, we're limiting max # of datarows
430-
# until we address performance issues with datarow create with metadata
431-
if len(items) > MAX_DATAROW_WITH_METADATA:
432-
for row in items:
433-
if 'metadata_fields' in row:
434-
raise MalformedQueryException(
435-
f"Cannot create more than {MAX_DATAROW_WITH_METADATA} DataRows, if any DataRows contain metadata"
436-
)
437-
438428
with ThreadPoolExecutor(file_upload_thread_count) as executor:
439429
futures = [executor.submit(convert_item, item) for item in items]
440430
items = [future.result() for future in as_completed(futures)]

0 commit comments

Comments
 (0)