Skip to content

Commit fccb216

Browse files
authored
Merge pull request #106 from scaleapi/nucleus_autotag_deletion
Delete Autotag via API
2 parents 38913d6 + d1e890c commit fccb216

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

nucleus/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,16 @@ def list_autotags(self, dataset_id: str) -> List[str]:
11551155
)
11561156
return response[AUTOTAGS_KEY] if AUTOTAGS_KEY in response else response
11571157

1158+
def delete_autotag(self, autotag_id: str) -> dict:
1159+
"""
1160+
Deletes an autotag based on autotagId.
1161+
Returns an empty payload where response status `200` indicates
1162+
the autotag has been successfully deleted.
1163+
:param autotag_id: id of the autotag to delete.
1164+
:return: {}
1165+
"""
1166+
return self.make_request({}, f"autotag/{autotag_id}", requests.delete)
1167+
11581168
def delete_model(self, model_id: str) -> dict:
11591169
"""
11601170
This endpoint deletes the specified model, along with all

tests/test_autotag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO: Test delete_autotag once API support for autotag creation is added.

0 commit comments

Comments
 (0)