nomic 3.5.1__tar.gz → 3.5.3__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.
Potentially problematic release.
This version of nomic might be problematic. Click here for more details.
- {nomic-3.5.1 → nomic-3.5.3}/PKG-INFO +1 -1
- {nomic-3.5.1 → nomic-3.5.3}/nomic/dataset.py +3 -33
- {nomic-3.5.1 → nomic-3.5.3}/nomic/embed.py +1 -1
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/PKG-INFO +1 -1
- {nomic-3.5.1 → nomic-3.5.3}/setup.py +1 -1
- {nomic-3.5.1 → nomic-3.5.3}/README.md +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/__init__.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/atlas.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/aws/__init__.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/aws/sagemaker.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/cli.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/data_inference.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/data_operations.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/pl_callbacks/__init__.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/pl_callbacks/pl_callback.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/settings.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic/utils.py +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/SOURCES.txt +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/dependency_links.txt +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/entry_points.txt +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/requires.txt +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/nomic.egg-info/top_level.txt +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/pyproject.toml +0 -0
- {nomic-3.5.1 → nomic-3.5.3}/setup.cfg +0 -0
|
@@ -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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|