Skip to content

Commit 4617283

Browse files
committed
change api paths
1 parent e316f5b commit 4617283

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

nucleus/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,34 +1206,34 @@ def delete_custom_index(self, dataset_id: str):
12061206
requests_command=requests.delete,
12071207
)
12081208

1209-
def toggle_continuous_indexing(self, dataset_id: str, enable: bool = True):
1209+
def set_continuous_indexing(self, dataset_id: str, enable: bool = True):
12101210
"""
1211-
Toggles continuous indexing for a given dataset, which will automatically generate embeddings whenever
1212-
new images are uploaded. This endpoint is currently locked for most users. Please contact the nucleus team if
1213-
you wish to use this endpoint.
1211+
Sets continuous indexing for a given dataset, which will automatically generate embeddings whenever
1212+
new images are uploaded. This endpoint is currently only enabled for enterprise customers.
1213+
Please reach out to nucleus@scale.com if you wish to learn more.
12141214
12151215
:param
12161216
dataset_id: id of dataset that continuous indexing is being toggled for
12171217
enable: boolean, sets whether we are enabling or disabling continuous indexing. The default behavior is to enable.
12181218
"""
12191219
return self.make_request(
12201220
{INDEX_CONTINUOUS_ENABLE_KEY: enable},
1221-
f"indexing/{dataset_id}/toggleContinuous",
1221+
f"indexing/{dataset_id}/setContinuous",
12221222
requests_command=requests.post,
12231223
)
12241224

1225-
def kickoff_image_indexing(self, dataset_id: str, enable: bool = True):
1225+
def create_image_index(self, dataset_id: str):
12261226
"""
1227-
Starts indexing generating embeddings for images without embeddings in a given dataset. These embeddings will
1228-
be used for autotag and similarity search. This endpoint is currently locked for most users.
1229-
Please contact the nucleus team if you wish to use this endpoint.
1227+
Starts generating embeddings for images that don't have embeddings in a given dataset. These embeddings will
1228+
be used for autotag and similarity search. This endpoint is currently only enabled for enterprise customers.
1229+
Please reach out to nucleus@scale.com if you wish to learn more.
12301230
12311231
:param
12321232
dataset_id: id of dataset for generating embeddings on.
12331233
"""
12341234
return self.make_request(
12351235
{},
1236-
f"indexing/{dataset_id}/kickoffImage",
1236+
f"indexing/{dataset_id}/internal/image",
12371237
requests_command=requests.post,
12381238
)
12391239

nucleus/dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ def create_custom_index(self, embeddings_urls: list, embedding_dim: int):
376376
def delete_custom_index(self):
377377
return self._client.delete_custom_index(self.id)
378378

379-
def toggle_continuous_indexing(self, enable: bool = True):
380-
return self._client.toggle_continuous_indexing(self.id, enable)
379+
def set_continuous_indexing(self, enable: bool = True):
380+
return self._client.set_continuous_indexing(self.id, enable)
381381

382-
def kickoff_image_indexing(self):
383-
return self._client.kickoff_image_indexing(self.id)
382+
def create_image_index(self):
383+
return self._client.create_image_index(self.id)
384384

385385
def check_index_status(self, job_id: str):
386386
return self._client.check_index_status(job_id)

0 commit comments

Comments
 (0)