modzyClient.getModelVersion

Retrieve model version details

modzyClient.getModelVersion(modelId, versionId)

Returns version details. It includes timeout, requirement, containerImage, loadStatus, runStatus, inputs, outputs, statistics, technicalDetails, sampleInput, sampleOutput, performanceSummary, processing, and others.

Parameters

ParameterTypeDescriptionExample
modelIdstringA model identifier assigned by Modzy.'ed542963de'
versionIdstringThe model’s version number'0.0.27'

Returns

A ModelVersion instance with detailed information regarding the version and the model.

{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "$ref": "#/definitions/ModelVersion",
    "definitions": {
        "ModelVersion": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "version": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "inputValidationSchema": {
                    "type": "string"
                },
                "createdBy": {
                    "type": "string"
                },
                "timeout": {
                    "$ref": "#/definitions/Timeout"
                },
                "requirement": {
                    "$ref": "#/definitions/Requirement"
                },
                "containerImage": {
                    "$ref": "#/definitions/ContainerImage"
                },
                "inputs": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ModelVersionInput"
                    }
                },
                "outputs": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ModelVersionOutput"
                    }
                },
                "statistics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Statistic"
                    }
                },
                "isActive": {
                    "type": "boolean"
                },
                "longDescription": {
                    "type": "string"
                },
                "technicalDetails": {
                    "type": "string"
                },
                "isAvailable": {
                    "type": "boolean"
                },
                "sourceType": {
                    "type": "string"
                },
                "versionHistory": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "performanceSummary": {
                    "type": "string"
                },
                "model": {
                    "$ref": "#/definitions/Model"
                },
                "processing": {
                    "$ref": "#/definitions/Processing"
                }
            },
            "required": [
                "containerImage",
                "createdAt",
                "createdBy",
                "inputValidationSchema",
                "inputs",
                "isActive",
                "isAvailable",
                "longDescription",
                "model",
                "outputs",
                "performanceSummary",
                "processing",
                "requirement",
                "sourceType",
                "statistics",
                "status",
                "technicalDetails",
                "timeout",
                "updatedAt",
                "version",
                "versionHistory"
            ]            
        },
        "ContainerImage": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "uploadStatus": {
                    "type": "string"
                },
                "loadStatus": {
                    "type": "string"
                },
                "uploadPercentage": {
                    "type": "integer"
                },
                "loadPercentage": {
                    "type": "integer"
                },
                "containerImageSize": {
                    "type": "integer"
                },
                "registryHost": {
                    "type": "string"
                },
                "repositoryNamespace": {
                    "type": "string"
                },
                "repositoryName": {
                    "type": "string"
                }
            },
            "required": [
                "containerImageSize",
                "loadPercentage",
                "loadStatus",
                "registryHost",
                "repositoryName",
                "repositoryNamespace",
                "uploadPercentage",
                "uploadStatus"
            ]            
        },
        "ModelVersionInput": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "type": "string"
                },
                "acceptedMediaTypes": {
                    "type": "string"
                },
                "maximumSize": {
                    "type": "integer"
                },
                "description": {
                    "type": "string"
                }                
            },
            "required": [
                "acceptedMediaTypes",
                "description",
                "maximumSize",
                "name"
            ]            
        },
        "ModelVersionOutput": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
              "name": {
                  "type": "string"
              },              
              "maximumSize": {
                  "type": "integer"
              },
              "description": {
                  "type": "string"
              },
              "mediaType": {
                  "type": "string"
              }
          },
          "required": [
              "mediaType",
              "description",
              "maximumSize",
              "name"
          ]            
        },
        "Model": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "modelId": {
                    "type": "string"
                },
                "latestVersion": {
                    "type": "string"
                },
                "latestActiveVersion": {
                    "type": "string"
                },
                "versions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "author": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "permalink": {
                    "type": "string"
                },
                "features": {
                    "type": "array",
                    "items": {}
                },
                "isActive": {
                    "type": "boolean"
                },
                "isRecommended": {
                    "type": "boolean"
                },
                "isCommercial": {
                    "type": "boolean"
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Tag"
                    }
                },
                "images": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Image"
                    }
                },
                "snapshotImages": {
                    "type": "array",
                    "items": {}
                },
                "lastActiveDateTime": {
                    "type": "string",
                    "format": "date-time"
                },
                "visibility": {
                    "$ref": "#/definitions/Visibility"
                }
            },
            "required": [
                "author",
                "description",
                "features",
                "images",
                "isActive",
                "isCommercial",
                "isRecommended",
                "lastActiveDateTime",
                "latestActiveVersion",
                "latestVersion",
                "modelId",
                "name",
                "permalink",
                "snapshotImages",
                "tags",
                "versions",
                "visibility"
            ],            
        },
        "Image": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "url": {
                    "type": "string"
                },
                "caption": {
                    "type": "string"
                },
                "relationType": {
                    "type": "string"
                }
            },
            "required": [
                "caption",
                "relationType",
                "url"
            ],            
        },
        "Tag": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "identifier": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "dataType": {
                    "type": "string"
                },
                "isCategorical": {
                    "type": "boolean"
                }
            },
            "required": [
                "dataType",
                "identifier",
                "isCategorical",
                "name"
            ]            
        },
        "Visibility": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "scope": {
                    "type": "string"
                }
            },
            "required": [
                "scope"
            ]            
        },
        "Processing": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "minimumParallelCapacity": {
                    "type": "integer"
                },
                "maximumParallelCapacity": {
                    "type": "integer"
                }
            },
            "required": [
                "maximumParallelCapacity",
                "minimumParallelCapacity"
            ]            
        },
        "Requirement": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "gpuUnits": {
                    "type": "integer"
                },
                "cpuAmount": {
                    "type": "string"
                },
                "memoryAmount": {
                    "type": "string"
                }
            },
            "required": [
                "cpuAmount",
                "gpuUnits",
                "memoryAmount"
            ]            
        },
        "Statistic": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "label": {
                    "type": "string"
                },
                "category": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "highlight": {
                    "type": "boolean"
                },
                "order": {
                    "type": "integer"
                },
                "value": {
                    "type": "number"
                }
            },
            "required": [
                "category",
                "description",
                "highlight",
                "label",
                "order",
                "type",
                "value"
            ]
        },
        "Timeout": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "status": {
                    "type": "integer"
                },
                "run": {
                    "type": "integer"
                }
            },
            "required": [
                "run",
                "status"
            ]            
        }
    }
}

Examples

version = modzyClient.getModelVersion('ed542963de', '0.0.27');
console.table(version)

Using promises

modzyClient.getModelVersion('ed542963de', '0.0.27')
  .then(
    (version)=>{
      console.table(version);
    }
  )
  .catch(
    (error)=>{
      console.error(error);
    }
  );