Container

pydantic model ibm_watsonx_gov.entities.container.BaseContainer

Bases: BaseModel

Show JSON schema
{
   "title": "BaseContainer",
   "type": "object",
   "properties": {
      "container_id": {
         "description": "Space or project id",
         "examples": [
            "550547b0-1be2-4426-8e62-f3423b0b83dd"
         ],
         "title": "Container Id",
         "type": "string"
      },
      "container_type": {
         "$ref": "#/$defs/ContainerType",
         "description": "The container type, project or space",
         "examples": [
            "project",
            "space"
         ]
      },
      "stage": {
         "$ref": "#/$defs/EvaluationStage",
         "description": "The stage of the container",
         "examples": [
            "development",
            "production"
         ]
      },
      "prompt_setup": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The prompt setup details for the container",
         "title": "Prompt Setup"
      },
      "monitors": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/BaseMonitor"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of monitors to set up for the container",
         "title": "Monitors"
      }
   },
   "$defs": {
      "BaseMonitor": {
         "properties": {
            "monitor_name": {
               "description": "Monitor name",
               "examples": [
                  "generative_ai_quality",
                  "drift_v2"
               ],
               "title": "Monitor Name",
               "type": "string"
            },
            "thresholds": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/MonitorThreshold"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "List of metric thresholds",
               "title": "Thresholds"
            },
            "parameters": {
               "anyOf": [
                  {
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Monitor parameters",
               "title": "Parameters"
            }
         },
         "required": [
            "monitor_name"
         ],
         "title": "BaseMonitor",
         "type": "object"
      },
      "ContainerType": {
         "enum": [
            "project",
            "space"
         ],
         "title": "ContainerType",
         "type": "string"
      },
      "EvaluationStage": {
         "description": "Supported evaluation stages",
         "enum": [
            "development",
            "pre_production",
            "production"
         ],
         "title": "EvaluationStage",
         "type": "string"
      },
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   },
   "required": [
      "container_id",
      "container_type",
      "stage"
   ]
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field container_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Space or project id', examples=['550547b0-1be2-4426-8e62-f3423b0b83dd'])] [Required]

Space or project id

field container_type: SPACE: 'space'>])] [Required]

The container type, project or space

field monitors: Annotated[list[BaseMonitor] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of monitors to set up for the container')] = None

List of monitors to set up for the container

field prompt_setup: Annotated[dict[str, Any] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='The prompt setup details for the container')] = None

The prompt setup details for the container

field stage: PRODUCTION: 'production'>])] [Required]

The stage of the container

pydantic model ibm_watsonx_gov.entities.container.ProjectContainer

Bases: BaseContainer

Show JSON schema
{
   "title": "ProjectContainer",
   "type": "object",
   "properties": {
      "container_id": {
         "description": "Space or project id",
         "examples": [
            "550547b0-1be2-4426-8e62-f3423b0b83dd"
         ],
         "title": "Container Id",
         "type": "string"
      },
      "container_type": {
         "$ref": "#/$defs/ContainerType",
         "default": "project"
      },
      "stage": {
         "$ref": "#/$defs/EvaluationStage",
         "default": "development"
      },
      "prompt_setup": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The prompt setup details for the container",
         "title": "Prompt Setup"
      },
      "monitors": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/BaseMonitor"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of monitors to set up for the container",
         "title": "Monitors"
      }
   },
   "$defs": {
      "BaseMonitor": {
         "properties": {
            "monitor_name": {
               "description": "Monitor name",
               "examples": [
                  "generative_ai_quality",
                  "drift_v2"
               ],
               "title": "Monitor Name",
               "type": "string"
            },
            "thresholds": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/MonitorThreshold"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "List of metric thresholds",
               "title": "Thresholds"
            },
            "parameters": {
               "anyOf": [
                  {
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Monitor parameters",
               "title": "Parameters"
            }
         },
         "required": [
            "monitor_name"
         ],
         "title": "BaseMonitor",
         "type": "object"
      },
      "ContainerType": {
         "enum": [
            "project",
            "space"
         ],
         "title": "ContainerType",
         "type": "string"
      },
      "EvaluationStage": {
         "description": "Supported evaluation stages",
         "enum": [
            "development",
            "pre_production",
            "production"
         ],
         "title": "EvaluationStage",
         "type": "string"
      },
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   },
   "required": [
      "container_id"
   ]
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field container_type: ContainerType = ContainerType.PROJECT
field stage: EvaluationStage = EvaluationStage.DEVELOPMENT
pydantic model ibm_watsonx_gov.entities.container.SpaceContainer

Bases: BaseContainer

Show JSON schema
{
   "title": "SpaceContainer",
   "type": "object",
   "properties": {
      "container_id": {
         "description": "Space or project id",
         "examples": [
            "550547b0-1be2-4426-8e62-f3423b0b83dd"
         ],
         "title": "Container Id",
         "type": "string"
      },
      "container_type": {
         "$ref": "#/$defs/ContainerType",
         "default": "space"
      },
      "stage": {
         "$ref": "#/$defs/EvaluationStage",
         "default": "production"
      },
      "prompt_setup": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The prompt setup details for the container",
         "title": "Prompt Setup"
      },
      "monitors": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/BaseMonitor"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of monitors to set up for the container",
         "title": "Monitors"
      },
      "serving_name": {
         "description": "Serving name of the deployment. This should be unique per space",
         "title": "Serving Name",
         "type": "string"
      },
      "base_model_id": {
         "description": "The model id of the space deployment base model",
         "title": "Base Model Id",
         "type": "string"
      },
      "description": {
         "description": "Space deployment description",
         "title": "Description",
         "type": "string"
      },
      "name": {
         "description": "Space deployment name",
         "title": "Name",
         "type": "string"
      },
      "version_date": {
         "description": "Space deployment version",
         "title": "Version Date",
         "type": "string"
      }
   },
   "$defs": {
      "BaseMonitor": {
         "properties": {
            "monitor_name": {
               "description": "Monitor name",
               "examples": [
                  "generative_ai_quality",
                  "drift_v2"
               ],
               "title": "Monitor Name",
               "type": "string"
            },
            "thresholds": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/MonitorThreshold"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "List of metric thresholds",
               "title": "Thresholds"
            },
            "parameters": {
               "anyOf": [
                  {
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Monitor parameters",
               "title": "Parameters"
            }
         },
         "required": [
            "monitor_name"
         ],
         "title": "BaseMonitor",
         "type": "object"
      },
      "ContainerType": {
         "enum": [
            "project",
            "space"
         ],
         "title": "ContainerType",
         "type": "string"
      },
      "EvaluationStage": {
         "description": "Supported evaluation stages",
         "enum": [
            "development",
            "pre_production",
            "production"
         ],
         "title": "EvaluationStage",
         "type": "string"
      },
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   },
   "required": [
      "container_id",
      "serving_name",
      "base_model_id",
      "description",
      "name",
      "version_date"
   ]
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field base_model_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='The model id of the space deployment base model')] [Required]

The model id of the space deployment base model

field container_type: ContainerType = ContainerType.SPACE
field description: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Space deployment description')] [Required]

Space deployment description

field name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Space deployment name')] [Required]

Space deployment name

field serving_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Serving name of the deployment. This should be unique per space')] [Required]

Serving name of the deployment. This should be unique per space

field stage: EvaluationStage = EvaluationStage.PRODUCTION
field version_date: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Space deployment version')] [Required]

Space deployment version