Skip to main content

model_versions

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

Overview​

Namemodel_versions
TypeResource
Idnvidia.private_registry.model_versions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idinteger (int64)Deprecated: Please use versionId instead. Unique ID of the version
version_idstringUnique version id. Please use this instead of 'id' (wire: versionId)
owner_namestringName of the user who owns this version (wire: ownerName)
accuracy_reachednumber (float)Accuracy this model reached (wire: accuracyReached)
batch_sizeinteger (int64)Batch size this model was trained with (wire: batchSize)
created_by_userstringId of the user who created this model (wire: createdByUser)
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)
custom_metricsarray (wire: customMetrics)
descriptionstringDescription of the model version
gpu_modelstringGPU model and memory (wire: gpuModel)
is_signedbooleanIndicates if the version is signed (wire: isSigned)
malware_scan_datestringScan 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: malwareScanDate)
malware_scan_statusstringMalware scan status (NOT_SCANNED, IN_PROGRESS, CLEAN, SUSPICIOUS, FAILED, MALICIOUS) (wire: malwareScanStatus)
memory_footprintstringModel size/memory footprint for inference (wire: memoryFootprint)
number_of_epochsinteger (int64)Number of epochs this model trained (wire: numberOfEpochs)
nvcf_container_configurationobjectNVCF container configuration parameters (wire: nvcfContainerConfiguration)
nvcf_deployment_specificationobjectNVCF deployment specification (wire: nvcfDeploymentSpecification)
other_contentsarray (wire: otherContents)
policyarray
release_typestringRelease type enum for the artifact version in the product lifecycle. (BETA, GA, EA, FEATURE, PRODUCTION, LTSB) (wire: releaseType)
statusstringVersion status (UPLOAD_PENDING, UPLOAD_COMPLETE)
storage_versionstringThe storage version i.e. the format the file and their contents are persisted in in object store. Possible values include V1 - for legacy artifact versions with files, V2 - for new artifact versions with blob registry, `` - for artifact versions without any files. (wire: storageVersion)
total_file_countinteger (int64)Total file count (wire: totalFileCount)
total_size_in_bytesinteger (int64)Total size of the model in bytes (wire: totalSizeInBytes)
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)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_teamselectteam_name, model_name, version_idGet model version in team
getselectmodel_name, version_idGet model version in org
list_by_teamselectteam_name, model_namerelease_type, page_size, page_number, sort_orderList model versions in team
listselectmodel_namerelease_type, page_size, page_number, sort_orderList model versions in org
create_by_teaminsertteam_name, model_nameCreate model version in team. Please use the string versionId and not the deprecated numeric id. Semantic Versioning is recommended https:​//semver.org
createinsertmodel_nameCreate a new and empty model version in org. Please use the string versionId and not the deprecated numeric id. Semantic Versioning is recommended https:​//semver.org
update_by_teamupdateteam_name, model_name, version_idcreate_zip, set_latestUpdate model version information in team e.g. upload status
updateupdatemodel_name, version_idcreate_zip, set_latestUpdate model version information in org e.g. upload status
stashexecartifact_name, version_idStash artifact version information in org during upload paused state
stash_by_teamexecteam_name, artifact_name, version_idStash artifact version information in team in model version upload paused state

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
artifact_namestring (UTF-8)Artifact name
model_namestring (UTF-8)Model name
team_namestring (UTF-8)Team name
version_idstring (UTF-8)Version ID
create_zipbooleanCreate zip of version content
page_numberstring (UTF-8)Page number - zero based index
page_sizestring (UTF-8)Page size
release_typestring (UTF-8)Release Type
set_latestbooleanSet version to latest
sort_orderstring (UTF-8)Sort order

SELECT examples​

Get model version in team

SELECT
id,
version_id,
owner_name,
accuracy_reached,
batch_size,
created_by_user,
created_date,
custom_metrics,
description,
gpu_model,
is_signed,
malware_scan_date,
malware_scan_status,
memory_footprint,
number_of_epochs,
nvcf_container_configuration,
nvcf_deployment_specification,
other_contents,
policy,
release_type,
status,
storage_version,
total_file_count,
total_size_in_bytes,
updated_date
FROM nvidia.private_registry.model_versions
WHERE team_name = '{{ team_name }}' -- required
AND model_name = '{{ model_name }}' -- required
AND version_id = '{{ version_id }}' -- required
;

INSERT examples​

Create model version in team. Please use the string versionId and not the deprecated numeric id. Semantic Versioning is recommended https://semver.org

INSERT INTO nvidia.private_registry.model_versions (
accuracy_reached,
batch_size,
custom_metrics,
description,
gpu_model,
id,
memory_footprint,
number_of_epochs,
nvcf_container_configuration,
nvcf_deployment_specification,
other_contents,
owner_name,
version_id,
team_name,
model_name
)
SELECT
{{ accuracy_reached }},
{{ batch_size }},
'{{ custom_metrics }}',
'{{ description }}',
'{{ gpu_model }}',
{{ id }},
'{{ memory_footprint }}',
{{ number_of_epochs }},
'{{ nvcf_container_configuration }}',
'{{ nvcf_deployment_specification }}',
'{{ other_contents }}',
'{{ owner_name }}',
'{{ version_id }}',
'{{ team_name }}',
'{{ model_name }}'
RETURNING
model,
model_version,
request_status
;

UPDATE examples​

Update model version information in team e.g. upload status

UPDATE nvidia.private_registry.model_versions
SET
accuracy_reached = {{ accuracy_reached }},
batch_size = {{ batch_size }},
custom_metrics = '{{ custom_metrics }}',
description = '{{ description }}',
gpu_model = '{{ gpu_model }}',
memory_footprint = '{{ memory_footprint }}',
number_of_epochs = {{ number_of_epochs }},
nvcf_container_configuration = '{{ nvcf_container_configuration }}',
nvcf_deployment_specification = '{{ nvcf_deployment_specification }}',
other_contents = '{{ other_contents }}',
owner_name = '{{ owner_name }}',
status = '{{ status }}'
WHERE
team_name = '{{ team_name }}' --required
AND model_name = '{{ model_name }}' --required
AND version_id = '{{ version_id }}' --required
AND create-zip = {{ create-zip}}
AND set-latest = {{ set-latest}}
RETURNING
model,
model_version,
request_status;

Lifecycle Methods​

EXEC variables use wire (API) names.

Stash artifact version information in org during upload paused state

EXEC nvidia.private_registry.model_versions.stash
@artifact_name='{{ artifact_name }}' --required,
@version_id='{{ version_id }}' --required
;