Get Customization Target Details#

Prerequisites#

Before you can get 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 Get a Customization Target#

Choose one of the following options to get the details of a customization target.

import os
from nemo_microservices import NeMoMicroservices

# Initialize the client
client = NeMoMicroservices(
    base_url=os.environ['CUSTOMIZER_BASE_URL']
)

# Get customization target details
target = client.customization.targets.retrieve(
    target_name="llama-3.1-8b-instruct@2.0",
    namespace="meta"
)

print(f"Target name: {target.name}")
print(f"Status: {target.status}")
print(f"Description: {target.description}")
print(f"Enabled: {target.enabled}")
print(f"Parameters: {target.num_parameters}")
curl --get "${CUSTOMIZER_BASE_URL}/customization/targets/meta/llama-3.1-8b-instruct@2.0"
Example Response
{
  "id": "cust-target-abc123",
  "created_at": "2024-05-08T12:00:00Z",
  "updated_at": "2024-05-08T12:00:00Z",
  "name": "llama-3.1-8b-instruct@2.0",
  "namespace": "meta",
  "project": null,
  "ownership": {},
  "description": "Meta Llama 3.1 8B",
  "enabled": true,
  "base_model": "meta/llama-3.1-8b",
  "status": "ready",
  "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"
}