Update Model#
Prerequisites#
Before you can update a model, make sure that you have:
Access to the NeMo Entity Store microservice.
The model’s
namespace
andname
.
To Update a Model#
Choose one of the following options of updating 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.update(
namespace="your-namespace", # Namespace that you create using NeMo Entity Store
model_name="your-model-name",
custom_fields={"test-field": "test-value"},
)
print(response)
Make a PATCH request to the /v1/models/{namespace}/{name}
endpoint.
ENTITY_STORE_HOSTNAME="<URL for NeMo Entity Store>"
NAMESPACE="your-namespace" # Namespace that you create using NeMo Entity Store
MODEL_NAME="your-model-name"
curl -X PATCH "https://${ENTITY_STORE_HOSTNAME}/v1/models/${NAMESPACE}/${MODEL_NAME}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"custom_fields": {
"test-field": "test-value"
}
}' | jq
Example Response
{
"created_at": "2025-03-10T21:38:37.064850",
"updated_at": "2025-03-10T21:38:37.064851",
"name": "acui-737@cust-HKVydV9qRNvXFhWyns2emZ",
"namespace": "default",
"description": "squad ds",
"spec":
{
"num_parameters": 1000000000,
"context_size": 4096,
"num_virtual_tokens": 0,
"is_chat": false
},
"artifact":
{
"gpu_arch": "Ampere",
"precision": "bf16",
"tensor_parallelism": 1,
"backend_engine": "nemo",
"status": "created",
"files_url": "hf://default/user1-737@cust-HKVydV9qRNvXFhWyns2emZ"
},
"base_model": "meta/llama-3.2-1b",
"peft":
{
"finetuning_type": "lora"
},
"schema_version": "1.0",
"project": "project-U6V7dg8yvLGfSBfPYSron3",
"custom_fields":
{
"test-field": "test-value"
}
}