Update a Customization Target#
Prerequisites#
Before you can update a customization target’s details, make sure that you have:
The
namespace
the target belongs to.The
name
of the target.Set the
CUSTOMIZER_BASE_URL
environment variable to your NeMo Customizer service endpoint
export CUSTOMIZER_BASE_URL="https://your-customizer-service-url"
You can get this information for all targets by listing the available targets.
To Update a Customization Target#
Choose one of the following options to update a customization target’s metadata or enable/disable it. The following examples show you how to disable a customization target.
import os
from nemo_microservices import NeMoMicroservices
# Initialize the client
client = NeMoMicroservices(
base_url=os.environ['CUSTOMIZER_BASE_URL']
)
# Update customization target (disable it)
updated_target = client.customization.targets.update(
target_name="llama-3.1-8b-instruct@2.0",
namespace="default",
enabled=False
)
print(f"Updated target: {updated_target.name}")
print(f"Enabled: {updated_target.enabled}")
print(f"Status: {updated_target.status}")
curl -X PATCH "${CUSTOMIZER_BASE_URL}/customization/targets/default/llama-3.1-8b-instruct@2.0" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"enabled": false
}' | jq
Example Response
{
"id": "cust-target-abc123",
"name": "llama-3.1-8b-instruct@2.0",
"namespace": "meta",
"description": "Customization target for Meta Llama 3.1 8B",
"enabled": false,
"base_model": "meta/llama-3.1-8b",
"model_path": "llama-3_1-8b-instruct_2_0",
"model_uri": "ngc://nvidia/nemo/llama-3_1-8b:2.0",
"hf_endpoint": "<your HF endpoint>",
"tokenizer": {},
"num_parameters": 123456789,
"precision": "bf16-mixed",
"status": "created",
"ownership": {},
"custom_fields": {},
"created_at": "2024-05-08T12:00:00Z",
"updated_at": "2024-05-08T12:00:00Z"
}
Note
If you are updating the model_path
, model_uri
or re-enabling a target, please contact your admin to verify that the model download job doesn’t exist for this target. If it does, admin needs to update ttlSecondsAfterFinished
for modelDownloader
to 30 seconds or less (default TTL is set to 7200 seconds) and delete the job before proceeding.