List Customization Targets#
Prerequisites#
Before you can list available customization targets, make sure that you have:
Access to the NeMo Customizer service
At least one customization target created
Set the
CUSTOMIZER_BASE_URL
environment variable to your NeMo Customizer service endpoint
export CUSTOMIZER_BASE_URL="https://your-customizer-service-url"
To List Customization Targets#
Choose one of the following options to list all customization targets, with optional pagination, sorting, and filtering.
import os
from nemo_microservices import NeMoMicroservices
# Initialize the client
client = NeMoMicroservices(
base_url=os.environ['CUSTOMIZER_BASE_URL']
)
# List customization targets with filters
targets = client.customization.targets.list(
filter={
"base_model": "meta/llama-3.1-8b-instruct",
"status": "ready"
},
page=1,
page_size=10,
sort="-created_at"
)
print(f"Found {len(targets.data)} targets")
for target in targets.data:
print(f"Target: {target.name} - Status: {target.status}")
curl --get \
"${CUSTOMIZER_BASE_URL}/customization/targets" \
--data-urlencode "filter[base_model]=meta/llama-3.1-8b-instruct" \
--data-urlencode "filter[status]=ready" \
--data-urlencode "page=1" \
--data-urlencode "page_size=10" \
--data-urlencode "sort=-created_at" | jq
Targets with ready
status are ready for customization because Customizer finished downloading their files.
Example Response
{
"object": "list",
"data": [
{
"id": "cust-target-abc123",
"name": "llama-3.1-8b-instruct@2.0",
"namespace": "meta",
"description": "Meta Llama 3.1 8B",
"enabled": true,
"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",
"tokenizer": {},
"num_parameters": 8000000000,
"precision": "bf16-mixed",
"status": "ready",
"ownership": {},
"custom_fields": {},
"created_at": "2024-05-08T12:00:00Z",
"updated_at": "2024-05-08T12:00:00Z"
}
],
"pagination": {
"page": 1,
"page_size": 10,
"current_page_size": 1,
"total_pages": 1,
"total_results": 1
},
"sort": "-created_at",
"filter": {}
}