nomic 3.5.1__tar.gz → 3.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nomic
3
- Version: 3.5.1
3
+ Version: 3.5.2
4
4
  Summary: The official Nomic python client.
5
5
  Home-page: https://github.com/nomic-ai/nomic
6
6
  Author: nomic.ai
@@ -700,32 +700,6 @@ class AtlasProjection:
700
700
  def tile_destination(self):
701
701
  return Path("~/.nomic/cache", self.id).expanduser()
702
702
 
703
- def _get_atoms(self, ids: List[str]) -> List[Dict]:
704
- """
705
- Retrieves atoms by id
706
-
707
- Args:
708
- ids: list of atom ids
709
-
710
- Returns:
711
- A dictionary containing the resulting atoms, keyed by atom id.
712
-
713
- """
714
-
715
- if not isinstance(ids, list):
716
- raise ValueError("You must specify a list of ids when getting data.")
717
-
718
- response = requests.post(
719
- self.dataset.atlas_api_path + "/v1/project/atoms/get",
720
- headers=self.dataset.header,
721
- json={"project_id": self.dataset.id, "index_id": self.atlas_index_id, "atom_ids": ids},
722
- )
723
-
724
- if response.status_code == 200:
725
- return response.json()["atoms"]
726
- else:
727
- raise Exception(response.text)
728
-
729
703
 
730
704
  class AtlasDataStream(AtlasClass):
731
705
  def __init__(self, name: Optional[str] = "contrastors"):
@@ -1445,7 +1419,7 @@ class AtlasDataset(AtlasClass):
1445
1419
  images.append((current_temp_id, processed_blob_value))
1446
1420
 
1447
1421
  batch_size = 40
1448
- num_workers = 10
1422
+ num_workers = 2
1449
1423
 
1450
1424
  def send_request(batch_start_index):
1451
1425
  image_batch = images[batch_start_index : batch_start_index + batch_size]
@@ -1592,12 +1566,8 @@ class AtlasDataset(AtlasClass):
1592
1566
  None
1593
1567
  """
1594
1568
 
1595
- # Exactly 10 upload workers at a time.
1596
-
1597
- num_workers = 10
1598
-
1569
+ num_workers = 2
1599
1570
  # Each worker currently is too slow beyond a shard_size of 10000
1600
-
1601
1571
  # The heuristic here is: Never let shards be more than 10,000 items,
1602
1572
  # OR more than 16MB uncompressed. Whichever is smaller.
1603
1573
 
@@ -1713,7 +1683,7 @@ class AtlasDataset(AtlasClass):
1713
1683
  else:
1714
1684
  logger.info("Upload succeeded.")
1715
1685
 
1716
- def update_maps(self, data: List[Dict], embeddings: Optional[np.ndarray] = None, num_workers: int = 10):
1686
+ def update_maps(self, data: List[Dict], embeddings: Optional[np.ndarray] = None, num_workers: int = 2):
1717
1687
  """
1718
1688
  Utility method to update a project's maps by adding the given data.
1719
1689
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nomic
3
- Version: 3.5.1
3
+ Version: 3.5.2
4
4
  Summary: The official Nomic python client.
5
5
  Home-page: https://github.com/nomic-ai/nomic
6
6
  Author: nomic.ai
@@ -23,7 +23,7 @@ with open("README.md") as f:
23
23
 
24
24
  setup(
25
25
  name="nomic",
26
- version="3.5.1",
26
+ version="3.5.2",
27
27
  url="https://github.com/nomic-ai/nomic",
28
28
  description=description,
29
29
  long_description=long_description,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes