Skip to main content

models

Creates, updates, deletes, gets or lists a models resource.

Overview​

Namemodels
TypeResource
Idnvidia.private_registry.models

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringUnique name of the model
encryption_key_idstringID of the customer managed encryption key associated with this artifact (wire: encryptionKeyId)
latest_version_idinteger (int64)Deprecated: Please use latestVersionIdStr instead. ID of the latest version (wire: latestVersionId)
display_namestringDisplay name (wire: displayName)
org_namestringName of the org that the model belongs to (wire: orgName)
owner_namestringName of model's owner (wire: ownerName)
team_namestringName of the team that the model belongs to (wire: teamName)
access_typestring (LISTED, EXCLUSIVE, NOT_LISTED) (wire: accessType)
applicationstringApplication of the model
biasstringText describing bias in the model
built_bystringorganization that built the repository (wire: builtBy)
can_guest_downloadbooleanIndicates if a guest user can download (wire: canGuestDownload)
created_datestringCreation date in ISO-8601 format (pattern: <code>\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z</code>) (wire: createdDate)
descriptionstringDescription of the model
explainabilitystringText describing explainability for this model
frameworkstringFramework used to train this model
has_playgroundbooleanindicate if the Model has AI Playground configured (wire: hasPlayground)
has_signed_versionbooleanIndicates if the model has any signed versions (wire: hasSignedVersion)
is_favouritebooleanFlag indicating if model is user's favorite (wire: isFavourite)
is_playground_enabledbooleanindicate if AI Playground is enabled in the catalog (wire: isPlaygroundEnabled)
is_publicbooleanDetermines if model is publicly accessible (wire: isPublic)
is_read_onlybooleanindicate if current user has read only permissions (deprecated) (wire: isReadOnly)
labelsarray
latest_version_gpu_modelstringGPU model and memory used for the latest version (wire: latestVersionGpuModel)
latest_version_id_strstringID of the latest version (wire: latestVersionIdStr)
latest_version_size_in_bytesinteger (int64)Size of the latest version in bytes (wire: latestVersionSizeInBytes)
license_termsarray (wire: licenseTerms)
logostringURL for the logo image
model_formatstringFormat of the model (wire: modelFormat)
policy_labelsarray (wire: policyLabels)
precisionstringPrecision this model was trained with
privacystringText describing the privacy for this model
product_namesarray (wire: productNames)
public_dataset_usedobject (wire: publicDatasetUsed)
publisherstringorganization that published the repository
safety_and_securitystringText for describing the safety and security in the model (wire: safetyAndSecurity)
short_descriptionstringShort description of the model (wire: shortDescription)
updated_datestringUpdated date in ISO-8601 format (pattern: <code>\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z</code>) (wire: updatedDate)
versionsarray

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_teamselectteam_name, model_nameresolve_labels, remove_unresolved_labelsThis operation gets info of a model in the org/team.
getselectmodel_nameresolve_labels, remove_unresolved_labelsThis operation gets info of a model in the org.
list_by_teamselectteam_nameapp_name, page_size, page_reference, page_number, resolve_labels, remove_unresolved_labelsThis operation lists models the user can access in the org/team.
listselectapp_name, page_size, page_reference, page_number, resolve_labels, remove_unresolved_labelsThis operation lists models the user can access in the org.
create_by_teaminsertteam_name, framework, name, precisionThis operation creates a model in the org/team.
createinsertframework, name, precisionThis operation creates a model in the org.
update_by_teamupdateteam_name, model_nameThis operation updates details of a model in the org/team.
updateupdatemodel_nameThis operation updates details of a model in the org.
delete_by_teamdeleteteam_name, model_nameThis operation deletes a model in the org/team (SDK evidence: ngcsdk registry/api/models.py remove_model; not declared in the published definition).
deletedeletemodel_nameThis operation deletes a model in the org (SDK evidence: ngcsdk registry/api/models.py remove_model; not declared in the published definition).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
model_namestring (UTF-8)Model name
team_namestring (UTF-8)Team name
app_namestring (UTF-8)Application name
page_numberstring (UTF-8)Page number - zero based index
page_referencestring (UTF-8)[Deprecated] Page reference, Use page-number instead
page_sizestring (UTF-8)Page size
remove_unresolved_labelsbooleanRemove unresolved labels
resolve_labelsbooleanResolve labels

SELECT examples​

This operation gets info of a model in the org/team.

SELECT
name,
encryption_key_id,
latest_version_id,
display_name,
org_name,
owner_name,
team_name,
access_type,
application,
bias,
built_by,
can_guest_download,
created_date,
description,
explainability,
framework,
has_playground,
has_signed_version,
is_favourite,
is_playground_enabled,
is_public,
is_read_only,
labels,
latest_version_gpu_model,
latest_version_id_str,
latest_version_size_in_bytes,
license_terms,
logo,
model_format,
policy_labels,
precision,
privacy,
product_names,
public_dataset_used,
publisher,
safety_and_security,
short_description,
updated_date,
versions
FROM nvidia.private_registry.models
WHERE team_name = '{{ team_name }}' -- required
AND model_name = '{{ model_name }}' -- required
AND resolve_labels = '{{ resolve_labels }}'
AND remove_unresolved_labels = '{{ remove_unresolved_labels }}'
;

INSERT examples​

This operation creates a model in the org/team.

INSERT INTO nvidia.private_registry.models (
application,
bias,
built_by,
description,
display_name,
encryption_key,
explainability,
framework,
has_playground,
is_playground_enabled,
labels,
labels_v2,
license_terms,
logo,
model_format,
name,
owner_name,
precision,
privacy,
public_dataset_used,
publisher,
safety_and_security,
short_description,
team_name
)
SELECT
'{{ application }}',
'{{ bias }}',
'{{ built_by }}',
'{{ description }}',
'{{ display_name }}',
'{{ encryption_key }}',
'{{ explainability }}',
'{{ framework }}' /* required */,
{{ has_playground }},
{{ is_playground_enabled }},
'{{ labels }}',
'{{ labels_v2 }}',
'{{ license_terms }}',
'{{ logo }}',
'{{ model_format }}',
'{{ name }}' /* required */,
'{{ owner_name }}',
'{{ precision }}' /* required */,
'{{ privacy }}',
'{{ public_dataset_used }}',
'{{ publisher }}',
'{{ safety_and_security }}',
'{{ short_description }}',
'{{ team_name }}'
RETURNING
model,
request_status
;

UPDATE examples​

This operation updates details of a model in the org/team.

UPDATE nvidia.private_registry.models
SET
application = '{{ application }}',
bias = '{{ bias }}',
built_by = '{{ built_by }}',
description = '{{ description }}',
display_name = '{{ display_name }}',
explainability = '{{ explainability }}',
framework = '{{ framework }}',
has_playground = {{ has_playground }},
is_playground_enabled = {{ is_playground_enabled }},
labels = '{{ labels }}',
labels_v2 = '{{ labels_v2 }}',
license_terms = '{{ license_terms }}',
logo = '{{ logo }}',
model_format = '{{ model_format }}',
owner_name = '{{ owner_name }}',
precision = '{{ precision }}',
privacy = '{{ privacy }}',
public_dataset_used = '{{ public_dataset_used }}',
publisher = '{{ publisher }}',
safety_and_security = '{{ safety_and_security }}',
short_description = '{{ short_description }}'
WHERE
team_name = '{{ team_name }}' --required
AND model_name = '{{ model_name }}' --required
RETURNING
model,
request_status;

DELETE examples​

This operation deletes a model in the org/team (SDK evidence: ngcsdk registry/api/models.py remove_model; not declared in the published definition).

DELETE FROM nvidia.private_registry.models
WHERE team_name = '{{ team_name }}' --required
AND model_name = '{{ model_name }}' --required
;