Skip to content

Commit 62bce02

Browse files
author
Val Brodsky
committed
Added comments
1 parent ac76e38 commit 62bce02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

libs/labelbox/src/labelbox/schema/internal/descriptor_file_creator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ def convert_item(data_row_item):
303303

304304
def _chunk_down_by_bytes(self, items: List[dict],
305305
max_chunk_size: int) -> Generator[str, None, None]:
306+
"""
307+
Recursively chunks down a list of items into smaller lists until each list is less than or equal to max_chunk_size bytes
308+
NOTE: of one data row is large than max_chunk_size, it will be returned as one chunk
309+
310+
Returns:
311+
Generator[str, None, None]: A generator that yields a json string
312+
"""
306313
if not items:
307314
return
308315
data = json.dumps(items)

0 commit comments

Comments
 (0)