nomic 3.3.2__tar.gz → 3.3.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nomic
3
- Version: 3.3.2
3
+ Version: 3.3.3
4
4
  Summary: The official Nomic python client.
5
5
  Home-page: https://github.com/nomic-ai/nomic
6
6
  Author: nomic.ai
@@ -12,6 +12,7 @@ from pathlib import Path
12
12
  from typing import Dict, List, Optional, Tuple, Union
13
13
 
14
14
  import numpy as np
15
+ import pandas as pd
15
16
  import pyarrow as pa
16
17
  import requests
17
18
  from loguru import logger
@@ -1373,6 +1374,18 @@ class AtlasDataset(AtlasClass):
1373
1374
  blobs: A list of image paths, bytes, or PIL Images. Use if you want to create an AtlasDataset using image embeddings over your images. Note: Blobs are stored locally only.
1374
1375
  pbar: (Optional). A tqdm progress bar to update.
1375
1376
  """
1377
+ if isinstance(data, DataFrame):
1378
+ cols_before = set(data.columns)
1379
+ for col in cols_before:
1380
+ if col.startswith("_"):
1381
+ raise ValueError(
1382
+ f"You are attempting to upload a pandas dataframe with the column name {col}, but columns beginning with '_' are reserved for Atlas internal use. Please rename your column and try again."
1383
+ )
1384
+ data = pa.Table.from_pandas(data)
1385
+ for newcol in set(data.column_names).difference(cols_before):
1386
+ logger.warning(f"Dropping column {newcol} added in pandas conversion to pyarrow")
1387
+ data = data.drop([newcol])
1388
+
1376
1389
  if embeddings is not None:
1377
1390
  self._add_embeddings(data=data, embeddings=embeddings, pbar=pbar)
1378
1391
  elif isinstance(data, pa.Table) and "_embeddings" in data.column_names: # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nomic
3
- Version: 3.3.2
3
+ Version: 3.3.3
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.3.2",
26
+ version="3.3.3",
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