API Reference
Log In
API Reference

Versions

Overview

Every model version is a model instance that consists of a model container image and version details (metadata). Every model may have multiple active versions. Active versions feature in the Model Details page.

Metadata

The model metadata is a set of data that defines and describes model details. It helps users understand models and helps Modzy run models successfully. Model metadata includes a model name, description, technical details. Version metadata holds the details required to run inference. These data include timeout, requirement, containerImage, loadStatus, runStatus, inputs, outputs, statistics, technicalDetails, sampleInput, sampleOutput, performanceSummary, and processing among others. The Model service has APIs to get and update these version details.

The Model service also has routes to create new versions (which involves uploading a new version of a model container image), add metadata, deploy, and delete versions.

Model versioning

Version numbers follow semantic formatting. Check out our Versioning guide to learn more.

🚧

Only the model’s creator can update the model, create new versions, or update existing ones.

The versions object

{
    "version": "...",
    "createdAt": "2020-05-13T18:32:59.510+0000",
    "updatedAt": "2020-05-19T22:01:52.015+0000",
    "inputValidationSchema": "...",
    "timeout": {
        "status": 12345,
        "run": 12345
    },
    "requirement": {
        "gpuUnits": 0,
        "cpuAmount": "...",
        "memoryAmount": "...",
       	"name": "...",
       	"description": "..."
    },
    "containerImage": {
        "uploadStatus": "...",
        "loadStatus": "...",
        "uploadPercentage": 100,
        "loadPercentage": 100,
        "containerImageSize": 0,
        "registryHost": "...",
        "repositoryNamespace": "...",
        "repositoryName": "..."
    },
    "loadStatus": {
        "step": 2,
        "stepName": "...",
        "percentage": 100
    },
    "runStatus": {
        "step": 4,
        "stepName": "...",
        "percentage": 100,
        "result": {
            "status": "...",
            "engine": "...",
            "error": null,
            "startTime": "...",
            "endTime": "...",
            "updateTime": "...",
            "results.json": {}
        }
    },
    "inputs": [
        {
            "name": "input.txt",
            "acceptedMediaTypes": "application/json",
          	"maximumSize": 5242880,
            "description": "Input"
        }
    ],
    "outputs": [
        {
            "name": "results.json",
            "mediaType": "application/json",
            "maximumSize": 5242880,
            "description": "Result"
        }
    ],
    "statistics": [
        {
            "label": "...",
            "category": "...",
            "type": "...",
            "description": "...",
            "highlight": false,
            "order": 3,
            "value": 0.96
        }
    ],
    "isActive": true,
    "longDescription": "...",
    "technicalDetails": "...",
    "sampleInput": "...",
    "sampleOutput": "...",
    "isAvailable": true,
    "sourceType": "...",
    "versionHistory": "...",
    "status": "...",
    "performanceSummary": "...",
    "model": {
        "modelId": "...",
        "latestVersion": "...",
        "latestActiveVersion": "...",
        "versions": [],
        "author": "...",
        "name": "...",
        "description": "...",
        "permalink": "...",
        "features": [],
        "isActive": true,
        "isRecommended": false,
        "isCommercial": false,
        "tags": [
            {
                "identifier": "...",
                "name": "...",
                "dataType": "...",
                "isCategorical": true
            }
        ],
        "images": [],
        "isExpired": false,
        "lastActiveDateTime": "...",
        "createdByEmail": "...",
        "createdByFullName": "..."
    },
    "processing": {
        "minimumParallelCapacity": 1,
        "maximumParallelCapacity": 3
    },
    "availableInClientRegistry": true
}
ParameterTypeDescription
versionstringThe model’s instance number.
Versions control the metadata featured in the Model Details page.
Version numbers follow semantic formatting. Check out our versioning guide to learn more.
createdAtstringThe version’s creation date in ISO8601 (YYYY-MM-DDThh:mm:ss.sTZD) format.
updatedAtstringThe version’s last change date in ISO8601 (YYYY-MM-DDThh:mm:ss.sTZD)format.
inputValidationSchemastringA JSON schema that validates if the model can run the inputs provided.
timeoutobjectAn object that contains the version’s timeout parameters.
requirementobjectAn object that contains the version’s requirements' name, description, memory and hardware parameters.
containerImageobjectAn object that contains the version’s container image parameters.
loadStatusobjectThe container image load status. The load process is where Modzy tests the model’s /status route. It returns the step number, step name, and completion percentage.
runStatusobjectThe container image run status. The run process is where Modzy tests the model’s /run route. It returns the step number, step name, completion percentage, and run results.
inputsarrayAn array that contains the version’s input objects.
outputsarrayAn array that contains the version’s output objects.
statisticsarrayAn array that contains the version’s performance metrics.
isActivebooleanActive model versions are available in the Marketplace and can execute inference on data. It is true when a version’s status is ACTIVE.
longDescriptionstringThe version’s details such as what it does, how it works, and what to expect from the results. It’s featured in the Model Details page. It supports content in Markdown to include rich text, links, images, etc.
technicalDetailsstringThe version’s technical details such as how the model was designed, developed, and trained. It’s featured in the Model Details page. It supports content in Markdown to include rich text, links, images, etc.
sampleInputstringCreated with data file used to test the model, it shows users how to format API requests to run the model. Together with the sampleOutput, this sample is featured in the Model Details page in JSON format.
sampleOutputstringCreated from the model test results, it shows users how results are returned. Together with the sampleInput, this sample is featured in the Model Details page in JSON format.
isAvailablebooleanDefines if the version is available or coming soon.
sourceTypestringThe model’s source. Values can be "Custom Model", "BAH", "BAH Partner", or "Open Source". It’s featured in the Model Marketplace.
versionHistorystringThe version’s release notes. It contains details such as version changes and accomplishments. It’s featured in the Model Details page.
statusstringThe version’s status. Values can be partial, canceled, rejected, deleted, active, or inactive. Active versions are published in the Model Details page.
performanceSummarystringThe model’s performance summary such as the most effective scenarios and weak areas. It is published in the model details performance metrics section.
modelobjectAn object that displays the model’s parameters.
processingobjectAn object that displays the model’s processing engines details.
availableInClientRegistrybooleanExplains if the version exists in the client registry.

The timeouts object

{
    "status": 12345,
    "run": 12345
}
ParameterTypeDescription
statusnumberA job’s time limit to load a model and get it ready to run data.
Example: 30s
runnumberThe model’s time limit to process one input item. It starts when a single input item is loaded and ends when the result for that input item is returned.
Example: 30s

The requirements object

{
  "requirementId": 1,
  "gpuUnits": 1,
  "cpuAmount": "...",
  "memoryAmount": "...",
  "name": "...",
  "description": "..."
 }
ParameterTypeDescription
requirementIdstringThe identifier for the memory and hardware requirements set.
gpuUnitsnumberAn integer number of GPUs required to run the model container. GPU resources are optional.
cpuAmountstringA number of fractional CPUs required to run the model container. You can limit the percentage of the CPU that the container is allowed to use.
memoryAmountstringThe amount of system memory needed to run the model container (e.g. RAM). Measured in bytes, it can be a plain integer or a fixed-point integer using a suffix. Suffixes may be: G, M, K, or their power-of-two equivalents: Gi, Mi, Ki.Mi".
namestringThe requirement's name.
descriptionstringA text that usually describes the recommended use case or model type for that particular hardware configuration.

The container image object

{
    "uploadStatus": "...",
    "loadStatus": "...",
    "uploadPercentage": 100,
    "loadPercentage": 100,
    "containerImageSize": 0,
    "registryHost": "...",
    "imagePrefix": "...",
    "repositoryName": "..."
}
ParameterTypeDescription
uploadStatusstringThe current step in the container image upload process. It may be: "Uploading container image", "Loading model 'x'", or "Checking status endpoint".
loadStatusstringThe container image load status. The load process is where Modzy tests the model’s /status route. It returns the step number, step name, and completion percentage.
uploadPercentagenumberThe container image’s upload progress percentage.
loadPercentagenumberThe container image’s load progress percentage.
containerImageSizenumberThe container image’s file size in bytes.
registryHoststringThe URL hosting the Docker registry. Applicable for Docker files only.
imagePrefixstringThe location where the container image is stored. Applicable for Docker files only.
repositoryNamestringThe repository where the container image is located. Applicable for Docker files only.
repositoryNameSpacestringThe repository where the container image is stored. Applicable for Docker files only

The inputs object

{
    "name": "...",
    "acceptedMediaTypes": "...",
    "maximumSize": 12345,
    "description": "..."
}
ParameterTypeDescription
namestringThe input’s name. The input name provided to run a model must match this name.
string
acceptedMediaTypesstringThe input file MIME types the model supports.
maximumSizenumberThe maximum amount of data in bytes the model can process per input item.
descriptionstringThe input’s details such as options, dependencies, requirements, and other special considerations. It’s featured in the Model Details page. It supports content in Markdown format for including rich text, links, images, etc.

The outputs object

{
    "name": "...",
    "mediaType": "...",
    "maximumSize": 12345,
    "description": "..."
}
ParameterTypeDescription
namestringThe output name the model returns.
mediaTypestringThe output file MIME types the model supports.
maximumSizenumberThe maximum amount of data in bytes the model can return per output file.
descriptionstringThe output details such as what to expect and how to manage results. It’s featured in the Model Details page. It supports content in Markdown format for including rich text, links, images, etc.

The statistics object

{
  "label": "...",
  "category": "...",
  "type": "...",
  "description": "...",
  "highlight": false,
  "order": 3,
  "value": 0.96
}
ParameterTypeDescription
labelstringThe metric’s name. It may be a predefined or custom metric. It’s featured in the Model Details page.
categorystringThe metric’s value format. It can be numeric or text. Many times is a number between 0 and 1 but depending on the metric can be any number or even a string.
typestringThe metric’s measurement format. Values can be percentage, ratio, or text.
descriptionstringThe metric’s description such as how it is calculated and additional information. It’s featured in the Model Details page.
It is required when not using predefined metrics.
highlightbooleanHighlights metrics in the Model Details page. Defaults to true.
ordernumberThe order by which the metrics are displayed in the Model Details page.
valuenumberThe metric’s performance score. If the type is percentage, this value can range from 0 to 1. If the type is ratio, this value can be any positive number. If the type is text, this value can be a string with a max length of 100 characters. It’s featured in the Model Details page.

The processing object

{
    "minimumParallelCapacity": 1,
    "maximumParallelCapacity": 3
}
ParameterTypeDescription
minimumParallelCapacitynumberThe minimum number of processing engines a model’s version can run. It is a positive integer.
maximumParallelCapacitynumberThe maximum number of processing engines a model’s version can run. It is a positive integer.