Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions nomic/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ def _add_blobs(
images.append((current_temp_id, processed_blob_value))

batch_size = 40
num_workers = 10
num_workers = 2

def send_request(batch_start_index):
image_batch = images[batch_start_index : batch_start_index + batch_size]
Expand Down Expand Up @@ -1566,12 +1566,8 @@ def _add_data(
None
"""

# Exactly 10 upload workers at a time.

num_workers = 10

num_workers = 2
# Each worker currently is too slow beyond a shard_size of 10000

# The heuristic here is: Never let shards be more than 10,000 items,
# OR more than 16MB uncompressed. Whichever is smaller.

Expand Down Expand Up @@ -1687,7 +1683,7 @@ def send_request(i):
else:
logger.info("Upload succeeded.")

def update_maps(self, data: List[Dict], embeddings: Optional[np.ndarray] = None, num_workers: int = 10):
def update_maps(self, data: List[Dict], embeddings: Optional[np.ndarray] = None, num_workers: int = 2):
"""
Utility method to update a project's maps by adding the given data.

Expand Down