client.models.get_version

Retrieve model version details

client.models.get_version(model, version)

Returns version details. It includes timeout, requirement, container_image, load_status, run_status, inputs, outputs, statistics, technical_details, sample_input, sample_output, performance_summary, processing, and others.

Parameters

ParameterTypeDescriptionExample
modelstr
Model
A model identifier assigned by Modzy or a preloaded model object.'ed542963de'
versionstrThe model’s version number. It follows the semantic versioning format.'0.0.27'

Both model_id and version accept the value all. If all is used as the value for both parameters, then all models and version details will be returned.

Returns

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

{
  "version": "string",
  "created_at": "date-time",
  "updated_at": "date-time",
  "input_validation_schema": "string",
  "created_by": "string",
  "is_active": "boolean",
  "is_available": "boolean",
  "long_description": "string",
  "technical_details": "string",
  "source_type": "string",
  "version_history": "string",
  "status": "string",
  "performance_summary": "string",  
  "timeout": {
    "run": "integer",
    "status": "integer"
  },
  "requirement": {
    "gpu_units": "integer",
    "cpu_amount": "string",
    "memory_amount": "string"
  },
  "container_image": {
    "containerImageSize": "integer",
    "loadPercentage": "integer",
    "loadStatus": "string",
    "registryHost": "string",
    "repositoryName": "string",
    "repositoryNamespace": "string",
    "uploadPercentage": "integer",
    "uploadStatus": "string"
  },  
  "inputs":[
    {
      "name": "string",
      "acceptedMediaTypes": "string",
      "maximunSize": "integer"
    }
  ],
  "outputs": [
    {
      "name": "string",
      "mediaType": "string",
      "maximunSize": "integer"
    }
  ],
  "statistics": [
    {
      "category": "string",
      "description": "string",
      "highlight": "boolean",
      "label": "string",
      "order": "integer",
      "type": "string",
      "value": "object"
    }
  ],
  "processing": {
    "minimum_parallel_capacity": "integer",
    "maximum_parallel_capacity": "integer"
  }
  "model": {
    "model_id": "string",
    "latest_version": "string",
    "latest_active_version": "string",
    "versions": ["string"],
    "author": "string",
    "name": "string",
    "description": "string",
    "permalink": "string",
    "is_active": "boolean",
    "is_recommended": "boolean",
    "is_commercial": "boolean",
    "features": [
      {
        "identifier": "string",
        "name": "string",
        "description": "string"
      }
    ],
    "tags": [
      {
        "identifier": "string",
        "name": "string",
        "data_type": "string",
        "is_categorical": "boolean"
      }
    ],
    "images": [
      {
        "url": "string",
        "caption": "string",
        "relation_type": "string"
      }
    ],
    "last_active_date_time": "date-time"
  }  
}

Examples

>>> version = client.models.get_version('ed542963de', '0.0.27')
>>> version.version
'0.0.27'
>>> for input in version.inputs:
...   input.name
...   input.accepted_media_types
...
'input.txt'
'text/plain'
>>> for output in version.outputs:
...   output.name
...   output.media_type
...
'results.json'
'application/json'

Did this page help you?