Delete Model#

Prerequisites#

Before you can delete a model, make sure that you have:

  • Access to the NeMo Entity Store Microservice.

  • The model’s namespace and name.

To Delete a Model#

Choose one of the following options of deleting a model.

Set up a NeMoMicroservices client instance using the base URL of the NeMo Entity Store microservice and perform the task as follows.

from nemo_microservices import NeMoMicroservices

client = NeMoMicroservices(
    base_url=os.environ["ENTITY_STORE_BASE_URL"]
)

response = client.models.delete(
    namespace="your-namespace", # Namespace that you create using NeMo Entity Store
    model_name="your-model-name",
)
print(response)

Make a DELETE request to the /v1/models/{namespace}/{name} endpoint.

ENTITY_STORE_BASE_URL="<URL for NeMo Entity Store>"
NAMESPACE="your-namespace" # Namespace that you create using NeMo Entity Store
MODEL_NAME="your-model-name"

curl -X DELETE "${ENTITY_STORE_BASE_URL}/v1/models/${NAMESPACE}/${MODEL_NAME}" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' | jq
Example Response
{
  "message": "Resource deleted successfully.",
  "id": "model-T3r9RkWfw9ctowpcQ9fri5",
  "deleted_at": null
}