nomic 3.0.37__tar.gz → 3.0.39__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.0.37
3
+ Version: 3.0.39
4
4
  Summary: The official Nomic python client.
5
5
  Home-page: https://github.com/nomic-ai/nomic
6
6
  Author: nomic.ai
@@ -38,6 +38,7 @@ def map_data(
38
38
 
39
39
  Args:
40
40
  data: An ordered collection of the datapoints you are structuring. Can be a list of dictionaries, Pandas Dataframe or PyArrow Table.
41
+ blobs: A list of image paths, bytes, or PIL images to add to your image dataset.
41
42
  embeddings: An [N,d] numpy array containing the N embeddings to add.
42
43
  identifier: A name for your dataset that is used to generate the dataset identifier. A unique name will be chosen if not supplied.
43
44
  description: The description of your dataset
@@ -1041,7 +1041,7 @@ class AtlasDataset(AtlasClass):
1041
1041
  name: The name of the index and the map.
1042
1042
  indexed_field: For text datasets, name the data field corresponding to the text to be mapped.
1043
1043
  reuse_embeddings_from_index: the name of the index to reuse embeddings from.
1044
- modality: The data modality of this index. Currently, Atlas supports either `text` or `embedding` indices.
1044
+ modality: The data modality of this index. Currently, Atlas supports either `text`, `image`, or `embedding` indices.
1045
1045
  projection: Options for configuring the 2D projection algorithm
1046
1046
  topic_model: Options for configuring the topic model
1047
1047
  duplicate_detection: Options for configuring semantic duplicate detection
@@ -1064,7 +1064,7 @@ class AtlasDataset(AtlasClass):
1064
1064
  elif isinstance(topic_model, NomicTopicOptions):
1065
1065
  pass
1066
1066
  elif topic_model:
1067
- topic_model = NomicTopicOptions()
1067
+ topic_model = NomicTopicOptions(topic_label_field=indexed_field)
1068
1068
  else:
1069
1069
  topic_model = NomicTopicOptions(build_topic_model=False)
1070
1070
 
@@ -1149,9 +1149,14 @@ class AtlasDataset(AtlasClass):
1149
1149
  f"Could not find the index '{reuse_embeddings_from_index}' to re-use from. Possible options are {[index.name for index in indices]}"
1150
1150
  )
1151
1151
 
1152
- if indexed_field is None:
1152
+ if indexed_field is None and self.modality == "text":
1153
1153
  raise Exception("You did not specify a field to index. Specify an 'indexed_field'.")
1154
1154
 
1155
+ if self.modality == "image":
1156
+ indexed_field = "_blob_hash"
1157
+ if indexed_field is not None:
1158
+ logger.warning("Ignoring indexed_field for image datasets. Only _blob_hash is supported.")
1159
+
1155
1160
  if indexed_field not in self.dataset_fields:
1156
1161
  raise Exception(f"Indexing on {indexed_field} not allowed. Valid options are: {self.dataset_fields}")
1157
1162
 
@@ -1163,7 +1168,9 @@ class AtlasDataset(AtlasClass):
1163
1168
  topic_field = None
1164
1169
  topic_model.build_topic_model = False
1165
1170
  else:
1166
- topic_field = topic_model.topic_label_field
1171
+ topic_field = (
1172
+ topic_model.topic_label_field if topic_model.topic_label_field != indexed_field else None
1173
+ )
1167
1174
  else:
1168
1175
  topic_field = topic_model.topic_label_field
1169
1176
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nomic
3
- Version: 3.0.37
3
+ Version: 3.0.39
4
4
  Summary: The official Nomic python client.
5
5
  Home-page: https://github.com/nomic-ai/nomic
6
6
  Author: nomic.ai
@@ -8,7 +8,7 @@ description = "The official Nomic python client."
8
8
 
9
9
  setup(
10
10
  name="nomic",
11
- version="3.0.37",
11
+ version="3.0.39",
12
12
  url="https://github.com/nomic-ai/nomic",
13
13
  description=description,
14
14
  long_description=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