Model store objects

Objects and models for models, model tags, policies, segments, and model alerts. This data is maintained in the VIANOPS model store database. See supported Model store APIs.

vianops_client.models.modelstore.alerts

pydantic model V1AlertBaseModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertBaseModel",
   "type": "object",
   "properties": {
      "policy_uuid": {
         "title": "Policy Uuid",
         "description": "Unique ID of a policy related to the alert.",
         "type": "string"
      },
      "segment_id": {
         "title": "Segment Id",
         "description": "Unique ID of a segment related to the alert.",
         "type": "integer"
      },
      "table_id": {
         "title": "Table Id",
         "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
         "type": "string"
      },
      "severity": {
         "title": "Severity",
         "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
         "default": 1,
         "type": "integer"
      },
      "type": {
         "title": "Type",
         "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
         "type": "string"
      },
      "trigger_metric": {
         "title": "Trigger Metric",
         "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
         "type": "string"
      },
      "trigger_value": {
         "title": "Trigger Value",
         "description": "Value of the metric for which this alert triggers.",
         "type": "number"
      },
      "data": {
         "title": "Data",
         "description": "JSON body for the alert.",
         "type": "object"
      },
      "assigned": {
         "title": "Assigned",
         "description": "User who is assigned to the alert.",
         "type": "string"
      }
   },
   "required": [
      "policy_uuid",
      "table_id",
      "type",
      "status",
      "trigger_metric",
      "trigger_value",
      "data"
   ],
   "example": {
      "policy_uuid": "123-abc-456",
      "segment_id": null,
      "table_id": "1234",
      "severity": 3,
      "type": "drift",
      "status": "Open",
      "trigger_metric": "metric1",
      "trigger_value": 0.25,
      "data": {
         "key1": "value1"
      },
      "assigned": "user1"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘policy_uuid’: ‘123-abc-456’, ‘segment_id’: None, ‘table_id’: ‘1234’, ‘severity’: 3, ‘type’: ‘drift’, ‘status’: ‘Open’, ‘trigger_metric’: ‘metric1’, ‘trigger_value’: 0.25, ‘data’: {‘key1’: ‘value1’}, ‘assigned’: ‘user1’}}

Fields:
field assigned: str | None = None

User who is assigned to the alert.

field data: dict [Required]

JSON body for the alert.

field policy_uuid: str [Required]

Unique ID of a policy related to the alert.

field segment_id: int | None = None

Unique ID of a segment related to the alert.

field severity: int = 1

Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.

field status: str [Required]

Represents the status of the alert. Example values: Open, Fix in progress, Resolved, Ignored.

field table_id: str [Required]

Foreign key reference to drift or model performance row. Table determined by type of alert.

field trigger_metric: str [Required]

Metric for which this alert triggers. See the User Guide ‘Metrics’ page for guidance.

field trigger_value: float [Required]

Value of the metric for which this alert triggers.

field type: str [Required]

Type of alert. This field is case-insensitive. Supported values: drift, performance.

pydantic model V1AlertCreateModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertCreateModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1AlertBaseModel"
   },
   "definitions": {
      "V1AlertBaseModel": {
         "title": "V1AlertBaseModel",
         "type": "object",
         "properties": {
            "policy_uuid": {
               "title": "Policy Uuid",
               "description": "Unique ID of a policy related to the alert.",
               "type": "string"
            },
            "segment_id": {
               "title": "Segment Id",
               "description": "Unique ID of a segment related to the alert.",
               "type": "integer"
            },
            "table_id": {
               "title": "Table Id",
               "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
               "type": "string"
            },
            "severity": {
               "title": "Severity",
               "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
               "default": 1,
               "type": "integer"
            },
            "type": {
               "title": "Type",
               "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
               "type": "string"
            },
            "trigger_metric": {
               "title": "Trigger Metric",
               "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "trigger_value": {
               "title": "Trigger Value",
               "description": "Value of the metric for which this alert triggers.",
               "type": "number"
            },
            "data": {
               "title": "Data",
               "description": "JSON body for the alert.",
               "type": "object"
            },
            "assigned": {
               "title": "Assigned",
               "description": "User who is assigned to the alert.",
               "type": "string"
            }
         },
         "required": [
            "policy_uuid",
            "table_id",
            "type",
            "status",
            "trigger_metric",
            "trigger_value",
            "data"
         ],
         "example": {
            "policy_uuid": "123-abc-456",
            "segment_id": null,
            "table_id": "1234",
            "severity": 3,
            "type": "drift",
            "status": "Open",
            "trigger_metric": "metric1",
            "trigger_value": 0.25,
            "data": {
               "key1": "value1"
            },
            "assigned": "user1"
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.alerts.V1AlertBaseModel])

pydantic model V1AlertModel

Bases: V1AlertBaseModel

Show JSON schema
{
   "title": "V1AlertModel",
   "type": "object",
   "properties": {
      "policy_uuid": {
         "title": "Policy Uuid",
         "description": "Unique ID of a policy related to the alert.",
         "type": "string"
      },
      "segment_id": {
         "title": "Segment Id",
         "description": "Unique ID of a segment related to the alert.",
         "type": "integer"
      },
      "table_id": {
         "title": "Table Id",
         "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
         "type": "string"
      },
      "severity": {
         "title": "Severity",
         "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
         "default": 1,
         "type": "integer"
      },
      "type": {
         "title": "Type",
         "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
         "type": "string"
      },
      "trigger_metric": {
         "title": "Trigger Metric",
         "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
         "type": "string"
      },
      "trigger_value": {
         "title": "Trigger Value",
         "description": "Value of the metric for which this alert triggers.",
         "type": "number"
      },
      "data": {
         "title": "Data",
         "description": "JSON body for the alert.",
         "type": "object"
      },
      "assigned": {
         "title": "Assigned",
         "description": "User who is assigned to the alert.",
         "type": "string"
      },
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier generated by platform for the alert.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Timestamp (Unix time in milliseconds) when the alert was created.",
         "type": "number"
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.",
         "type": "number"
      },
      "created_by": {
         "title": "Created By",
         "description": "String representation of the username for the user who created the alert.         This should be added only on insert and never modified.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "String representation of the username for the last user who updated the alert.         When the alert is created, this should be equal to the value of `created_by`.",
         "type": "string"
      }
   },
   "required": [
      "policy_uuid",
      "table_id",
      "type",
      "status",
      "trigger_metric",
      "trigger_value",
      "data",
      "uuid",
      "created_ts",
      "modified_ts"
   ],
   "example": {
      "uuid": "123-abc-456",
      "type": "drift",
      "status": "Open",
      "policy_uuid": "123-abc-456",
      "segment_id": 1,
      "table_id": "12324",
      "severity": 5,
      "trigger_metric": "PSI",
      "trigger_value": 0.25,
      "data": {},
      "assigned": "user3",
      "created_ts": 1672531200000,
      "modified_ts": 1672531200000,
      "created_by": "user1",
      "modified_by": "user2"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘123-abc-456’, ‘type’: ‘drift’, ‘status’: ‘Open’, ‘policy_uuid’: ‘123-abc-456’, ‘segment_id’: 1, ‘table_id’: ‘12324’, ‘severity’: 5, ‘trigger_metric’: ‘PSI’, ‘trigger_value’: 0.25, ‘data’: {}, ‘assigned’: ‘user3’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}

Fields:
field created_by: str | None = None

String representation of the username for the user who created the alert. This should be added only on insert and never modified.

field created_ts: float [Required]

Timestamp (Unix time in milliseconds) when the alert was created.

field modified_by: str | None = None

String representation of the username for the last user who updated the alert. When the alert is created, this should be equal to the value of created_by.

field modified_ts: float [Required]

Timestamp (Unix time in milliseconds) when the alert was last modified.

field uuid: str [Required]

Unique identifier generated by platform for the alert.

pydantic model V1AlertModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertModelList",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1AlertModel"
         }
      }
   },
   "required": [
      "items"
   ],
   "example": [
      {
         "uuid": "123-abc-456",
         "type": "drift",
         "status": "Open",
         "policy_uuid": "123-abc-456",
         "segment_id": 1,
         "table_id": "12324",
         "severity": 5,
         "trigger_metric": "PSI",
         "trigger_value": 0.25,
         "data": {},
         "assigned": "user3",
         "created_ts": 1672531200000,
         "modified_ts": 1672531200000,
         "created_by": "user1",
         "modified_by": "user2"
      }
   ],
   "definitions": {
      "V1AlertModel": {
         "title": "V1AlertModel",
         "type": "object",
         "properties": {
            "policy_uuid": {
               "title": "Policy Uuid",
               "description": "Unique ID of a policy related to the alert.",
               "type": "string"
            },
            "segment_id": {
               "title": "Segment Id",
               "description": "Unique ID of a segment related to the alert.",
               "type": "integer"
            },
            "table_id": {
               "title": "Table Id",
               "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
               "type": "string"
            },
            "severity": {
               "title": "Severity",
               "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
               "default": 1,
               "type": "integer"
            },
            "type": {
               "title": "Type",
               "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
               "type": "string"
            },
            "trigger_metric": {
               "title": "Trigger Metric",
               "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "trigger_value": {
               "title": "Trigger Value",
               "description": "Value of the metric for which this alert triggers.",
               "type": "number"
            },
            "data": {
               "title": "Data",
               "description": "JSON body for the alert.",
               "type": "object"
            },
            "assigned": {
               "title": "Assigned",
               "description": "User who is assigned to the alert.",
               "type": "string"
            },
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier generated by platform for the alert.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was created.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "String representation of the username for the user who created the alert.         This should be added only on insert and never modified.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "String representation of the username for the last user who updated the alert.         When the alert is created, this should be equal to the value of `created_by`.",
               "type": "string"
            }
         },
         "required": [
            "policy_uuid",
            "table_id",
            "type",
            "status",
            "trigger_metric",
            "trigger_value",
            "data",
            "uuid",
            "created_ts",
            "modified_ts"
         ],
         "example": {
            "uuid": "123-abc-456",
            "type": "drift",
            "status": "Open",
            "policy_uuid": "123-abc-456",
            "segment_id": 1,
            "table_id": "12324",
            "severity": 5,
            "trigger_metric": "PSI",
            "trigger_value": 0.25,
            "data": {},
            "assigned": "user3",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: [{‘uuid’: ‘123-abc-456’, ‘type’: ‘drift’, ‘status’: ‘Open’, ‘policy_uuid’: ‘123-abc-456’, ‘segment_id’: 1, ‘table_id’: ‘12324’, ‘severity’: 5, ‘trigger_metric’: ‘PSI’, ‘trigger_value’: 0.25, ‘data’: {}, ‘assigned’: ‘user3’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}]}

Fields:
field items: List[V1AlertModel] [Required]
pydantic model V1AlertPageModel

Bases: V1PageModel

Show JSON schema
{
   "title": "V1AlertPageModel",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1AlertModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "required": [
      "items"
   ],
   "example": {
      "items": [
         {
            "uuid": "123-abc-456",
            "type": "drift",
            "status": "Open",
            "policy_uuid": "123-abc-456",
            "segment_id": 1,
            "table_id": "12324",
            "severity": 5,
            "trigger_metric": "PSI",
            "trigger_value": 0.25,
            "data": {},
            "assigned": "user3",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      ],
      "current_page": 1,
      "page_size": 100,
      "previous_page": null,
      "next_page": null,
      "has_previous": false,
      "previous_items": 0,
      "has_next": false,
      "total": 1,
      "pages": 1
   },
   "definitions": {
      "V1AlertModel": {
         "title": "V1AlertModel",
         "type": "object",
         "properties": {
            "policy_uuid": {
               "title": "Policy Uuid",
               "description": "Unique ID of a policy related to the alert.",
               "type": "string"
            },
            "segment_id": {
               "title": "Segment Id",
               "description": "Unique ID of a segment related to the alert.",
               "type": "integer"
            },
            "table_id": {
               "title": "Table Id",
               "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
               "type": "string"
            },
            "severity": {
               "title": "Severity",
               "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
               "default": 1,
               "type": "integer"
            },
            "type": {
               "title": "Type",
               "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
               "type": "string"
            },
            "trigger_metric": {
               "title": "Trigger Metric",
               "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "trigger_value": {
               "title": "Trigger Value",
               "description": "Value of the metric for which this alert triggers.",
               "type": "number"
            },
            "data": {
               "title": "Data",
               "description": "JSON body for the alert.",
               "type": "object"
            },
            "assigned": {
               "title": "Assigned",
               "description": "User who is assigned to the alert.",
               "type": "string"
            },
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier generated by platform for the alert.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was created.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "String representation of the username for the user who created the alert.         This should be added only on insert and never modified.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "String representation of the username for the last user who updated the alert.         When the alert is created, this should be equal to the value of `created_by`.",
               "type": "string"
            }
         },
         "required": [
            "policy_uuid",
            "table_id",
            "type",
            "status",
            "trigger_metric",
            "trigger_value",
            "data",
            "uuid",
            "created_ts",
            "modified_ts"
         ],
         "example": {
            "uuid": "123-abc-456",
            "type": "drift",
            "status": "Open",
            "policy_uuid": "123-abc-456",
            "segment_id": 1,
            "table_id": "12324",
            "severity": 5,
            "trigger_metric": "PSI",
            "trigger_value": 0.25,
            "data": {},
            "assigned": "user3",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘items’: [{‘uuid’: ‘123-abc-456’, ‘type’: ‘drift’, ‘status’: ‘Open’, ‘policy_uuid’: ‘123-abc-456’, ‘segment_id’: 1, ‘table_id’: ‘12324’, ‘severity’: 5, ‘trigger_metric’: ‘PSI’, ‘trigger_value’: 0.25, ‘data’: {}, ‘assigned’: ‘user3’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}

Fields:
field items: List[V1AlertModel] [Required]
pydantic model V1AlertSearchModel

Bases: V1FiltersCommon

Show JSON schema
{
   "title": "V1AlertSearchModel",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of alert uuids for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "policy_uuids": {
         "title": "Policy Uuids",
         "description": "List of policy IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "segment_ids": {
         "title": "Segment Ids",
         "description": "List of segment IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "table_ids": {
         "title": "Table Ids",
         "description": "List of table IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "severities": {
         "title": "Severities",
         "description": "List of alert severities for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "types": {
         "title": "Types",
         "description": "List of alert types for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of alert statuses for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "trigger_metrices": {
         "title": "Trigger Metrices",
         "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "assignee": {
         "title": "Assignee",
         "description": "List of alert assignees for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "trigger_value_start": {
         "title": "Trigger Value Start",
         "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.",
         "type": "number"
      },
      "trigger_value_end": {
         "title": "Trigger Value End",
         "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.",
         "type": "number"
      }
   }
}

Config:
  • fields: dict = {‘uuid’: ‘uuids’, ‘policy_uuid’: ‘policy_uuids’, ‘segment_id’: ‘segment_ids’, ‘table_id’: ‘table_ids’, ‘severity’: ‘severities’, ‘type’: ‘types’, ‘status’: ‘statuses’, ‘trigger_metric’: ‘trigger_metrics’, ‘created_by’: ‘created_bys’, ‘modified_by’: ‘modified_bys’}

Fields:
field assignee: List[str] | None = None

List of alert assignees for the alerts to search for.

field policy_uuid: List[str] | None = None (alias 'policy_uuids')

List of policy IDs for the alerts to search for.

field segment_id: List[int] | None = None (alias 'segment_ids')

List of segment IDs for the alerts to search for.

field severity: List[int] | None = None (alias 'severities')

List of alert severities for the alerts to search for.

field status: List[str] | None = None (alias 'statuses')

List of alert statuses for the alerts to search for.

field table_id: List[str] | None = None (alias 'table_ids')

List of table IDs for the alerts to search for.

field trigger_metrices: List[str] | None = None

List of trigger metrics for the alerts to search for. See the User Guide ‘Metrics’ page for guidance.

field trigger_value_end: float | None = None

End of trigger value to filter for. All alerts with trigger_value less than or equal to this value will be returned.

field trigger_value_start: float | None = None

Start of trigger value to filter for. All alerts with trigger_value greater than or equal to this value will be returned.

field type: List[str] | None = None (alias 'types')

List of alert types for the alerts to search for.

field uuid: List[str] | None = None (alias 'uuids')

List of alert uuids for the alerts to search for.

pydantic model V1AlertSearchRequest

Bases: V1PageSearch, V1AlertSearchModel

Show JSON schema
{
   "title": "V1AlertSearchRequest",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of alert uuids for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "policy_uuids": {
         "title": "Policy Uuids",
         "description": "List of policy IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "segment_ids": {
         "title": "Segment Ids",
         "description": "List of segment IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "table_ids": {
         "title": "Table Ids",
         "description": "List of table IDs for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "severities": {
         "title": "Severities",
         "description": "List of alert severities for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "types": {
         "title": "Types",
         "description": "List of alert types for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of alert statuses for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "trigger_metrices": {
         "title": "Trigger Metrices",
         "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "assignee": {
         "title": "Assignee",
         "description": "List of alert assignees for the alerts to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "trigger_value_start": {
         "title": "Trigger Value Start",
         "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.",
         "type": "number"
      },
      "trigger_value_end": {
         "title": "Trigger Value End",
         "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.",
         "type": "number"
      },
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "allOf": [
            {
               "$ref": "#/definitions/V1AlertSearchModel"
            }
         ]
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 100,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "filters": {
         "uuids": [
            "123-abc-456",
            "123-xyz-789"
         ],
         "severities": [
            3,
            5
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1AlertSearchModel": {
         "title": "V1AlertSearchModel",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of alert uuids for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "policy_uuids": {
               "title": "Policy Uuids",
               "description": "List of policy IDs for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "segment_ids": {
               "title": "Segment Ids",
               "description": "List of segment IDs for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "integer"
               }
            },
            "table_ids": {
               "title": "Table Ids",
               "description": "List of table IDs for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "severities": {
               "title": "Severities",
               "description": "List of alert severities for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "integer"
               }
            },
            "types": {
               "title": "Types",
               "description": "List of alert types for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of alert statuses for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "trigger_metrices": {
               "title": "Trigger Metrices",
               "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "assignee": {
               "title": "Assignee",
               "description": "List of alert assignees for the alerts to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "trigger_value_start": {
               "title": "Trigger Value Start",
               "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.",
               "type": "number"
            },
            "trigger_value_end": {
               "title": "Trigger Value End",
               "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.",
               "type": "number"
            }
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘filters’: {‘uuids’: [‘123-abc-456’, ‘123-xyz-789’], ‘severities’: [3, 5]}}}

Fields:
field filters: V1AlertSearchModel | None = None

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

pydantic model V1AlertUpdateFailedModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertUpdateFailedModel",
   "type": "object",
   "properties": {
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier generated by the platform for the alert.",
         "type": "string"
      },
      "error": {
         "title": "Error",
         "description": "Error message",
         "type": "string"
      }
   },
   "required": [
      "uuid",
      "error"
   ]
}

Fields:
field error: str [Required]

Error message

field uuid: str [Required]

Unique identifier generated by the platform for the alert.

pydantic model V1AlertUpdateModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertUpdateModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1AlertUpdateRequestModel"
   },
   "definitions": {
      "V1AlertUpdateRequestModel": {
         "title": "V1AlertUpdateRequestModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier generated by platform for the alert.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Field to represent the status of an alert. Possible values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
               "type": "string"
            },
            "assigned": {
               "title": "Assigned",
               "description": "User who is assigned to the alert.",
               "type": "string"
            }
         },
         "required": [
            "uuid"
         ]
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.alerts.V1AlertUpdateRequestModel])

pydantic model V1AlertUpdateRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertUpdateRequestModel",
   "type": "object",
   "properties": {
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier generated by platform for the alert.",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Field to represent the status of an alert. Possible values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
         "type": "string"
      },
      "assigned": {
         "title": "Assigned",
         "description": "User who is assigned to the alert.",
         "type": "string"
      }
   },
   "required": [
      "uuid"
   ]
}

Fields:
field assigned: str | None = None

User who is assigned to the alert.

field status: str | None = None

Field to represent the status of an alert. Possible values: Open, Fix in progress, Resolved, Ignored.

field uuid: str [Required]

Unique identifier generated by platform for the alert.

pydantic model V1AlertUpdateResponseModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1AlertUpdateResponseModel",
   "type": "object",
   "properties": {
      "succes": {
         "title": "Succes",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1AlertModel"
         }
      },
      "failed": {
         "title": "Failed",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1AlertUpdateFailedModel"
         }
      }
   },
   "required": [
      "succes",
      "failed"
   ],
   "definitions": {
      "V1AlertModel": {
         "title": "V1AlertModel",
         "type": "object",
         "properties": {
            "policy_uuid": {
               "title": "Policy Uuid",
               "description": "Unique ID of a policy related to the alert.",
               "type": "string"
            },
            "segment_id": {
               "title": "Segment Id",
               "description": "Unique ID of a segment related to the alert.",
               "type": "integer"
            },
            "table_id": {
               "title": "Table Id",
               "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.",
               "type": "string"
            },
            "severity": {
               "title": "Severity",
               "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.",
               "default": 1,
               "type": "integer"
            },
            "type": {
               "title": "Type",
               "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.",
               "type": "string"
            },
            "trigger_metric": {
               "title": "Trigger Metric",
               "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "trigger_value": {
               "title": "Trigger Value",
               "description": "Value of the metric for which this alert triggers.",
               "type": "number"
            },
            "data": {
               "title": "Data",
               "description": "JSON body for the alert.",
               "type": "object"
            },
            "assigned": {
               "title": "Assigned",
               "description": "User who is assigned to the alert.",
               "type": "string"
            },
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier generated by platform for the alert.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was created.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "String representation of the username for the user who created the alert.         This should be added only on insert and never modified.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "String representation of the username for the last user who updated the alert.         When the alert is created, this should be equal to the value of `created_by`.",
               "type": "string"
            }
         },
         "required": [
            "policy_uuid",
            "table_id",
            "type",
            "status",
            "trigger_metric",
            "trigger_value",
            "data",
            "uuid",
            "created_ts",
            "modified_ts"
         ],
         "example": {
            "uuid": "123-abc-456",
            "type": "drift",
            "status": "Open",
            "policy_uuid": "123-abc-456",
            "segment_id": 1,
            "table_id": "12324",
            "severity": 5,
            "trigger_metric": "PSI",
            "trigger_value": 0.25,
            "data": {},
            "assigned": "user3",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      },
      "V1AlertUpdateFailedModel": {
         "title": "V1AlertUpdateFailedModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier generated by the platform for the alert.",
               "type": "string"
            },
            "error": {
               "title": "Error",
               "description": "Error message",
               "type": "string"
            }
         },
         "required": [
            "uuid",
            "error"
         ]
      }
   }
}

Fields:
field failed: List[V1AlertUpdateFailedModel] [Required]
field succes: List[V1AlertModel] [Required]

vianops_client.models.modelstore.model_tags

pydantic model V1BaseModelTagsModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1BaseModelTagsModel",
   "type": "object",
   "properties": {
      "model_uuid": {
         "title": "Model Uuid",
         "description": "UUID of the model that the tag is associated with.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the model tag.",
         "type": "string"
      },
      "value": {
         "title": "Value",
         "description": "Value of the model tag.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "string"
            },
            {
               "type": "array",
               "items": {}
            },
            {
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            {
               "type": "object"
            }
         ]
      }
   },
   "required": [
      "name",
      "value"
   ],
   "example": {
      "model_uuid": "abc-123-def-456",
      "name": "Example Model Tag",
      "value": {
         "key": "value"
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘model_uuid’: ‘abc-123-def-456’, ‘name’: ‘Example Model Tag’, ‘value’: {‘key’: ‘value’}}}

Fields:
Validators:
field model_uuid: str | None = None

UUID of the model that the tag is associated with.

field name: str [Required]

Name of the model tag.

Validated by:
field value: float | int | str | list | List[dict] | dict [Required]

Value of the model tag.

Validated by:
validator validate_name  »  name
validator value_float_or_int  »  value
pydantic model V1BaseModelTagsModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1BaseModelTagsModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1BaseModelTagsModel"
   },
   "definitions": {
      "V1BaseModelTagsModel": {
         "title": "V1BaseModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            }
         },
         "required": [
            "name",
            "value"
         ],
         "example": {
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            }
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.model_tags.V1BaseModelTagsModel])

pydantic model V1ModelTagsFilters

Bases: V1Filters

Show JSON schema
{
   "title": "V1ModelTagsFilters",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of uuids for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of names for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of statuses for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_uuids": {
         "title": "Model Uuids",
         "description": "List of model versions for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      }
   },
   "example": {
      "uuids": [
         "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
         "9140dd05-3f7a-49a4-b625-379880bd9606"
      ],
      "names": [
         "Example Tag 1"
      ]
   }
}

Config:
  • fields: dict = {‘uuid’: ‘uuids’, ‘model_uuid’: ‘model_uuids’, ‘name’: ‘names’, ‘status’: ‘statuses’, ‘created_by’: ‘created_bys’, ‘modified_by’: ‘modified_bys’}

  • schema_extra: dict = {‘example’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example Tag 1’]}}

Fields:
field model_uuid: List[str] | None = None (alias 'model_uuids')

List of model versions for this operation.

pydantic model V1ModelTagsModel

Bases: V1BaseModelTagsModel

Show JSON schema
{
   "title": "V1ModelTagsModel",
   "type": "object",
   "properties": {
      "model_uuid": {
         "title": "Model Uuid",
         "description": "UUID of the model that the tag is associated with.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the model tag.",
         "type": "string"
      },
      "value": {
         "title": "Value",
         "description": "Value of the model tag.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "string"
            },
            {
               "type": "array",
               "items": {}
            },
            {
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            {
               "type": "object"
            }
         ]
      },
      "uuid": {
         "title": "Uuid",
         "description": "UUID of the model tag.",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Unix time in milliseconds generated at creation time.",
         "type": "number"
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Unix time in milliseconds generated at last modification time.",
         "type": "number"
      },
      "created_by": {
         "title": "Created By",
         "description": "User that created the model",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User that modified the model",
         "type": "string"
      }
   },
   "required": [
      "name",
      "value",
      "status"
   ],
   "example": {
      "uuid": "xyz-789-rst-456",
      "model_uuid": "abc-123-def-456",
      "name": "Example Model Tag",
      "value": {
         "key": "value"
      },
      "status": "active",
      "created_ts": 1675292368,
      "modified_ts": 1675292368,
      "created_by": "user1",
      "modified_by": "user1"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘xyz-789-rst-456’, ‘model_uuid’: ‘abc-123-def-456’, ‘name’: ‘Example Model Tag’, ‘value’: {‘key’: ‘value’}, ‘status’: ‘active’, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user1’}}

Fields:
Validators:
field created_by: str | None = None

User that created the model

field created_ts: float | None = None

Unix time in milliseconds generated at creation time.

field modified_by: str | None = None

User that modified the model

field modified_ts: float | None = None

Unix time in milliseconds generated at last modification time.

field status: str [Required]

Current status of the model tag. This field is case-insensitive. Possible values: active`(default), `inactive , archived, delete.

field uuid: str | None = None

UUID of the model tag.

pydantic model V1ModelTagsModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1ModelTagsModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1ModelTagsModel"
   },
   "definitions": {
      "V1ModelTagsModel": {
         "title": "V1ModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model tag.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model",
               "type": "string"
            }
         },
         "required": [
            "name",
            "value",
            "status"
         ],
         "example": {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.model_tags.V1ModelTagsModel])

pydantic model V1ModelTagsModelPage

Bases: V1PageModel

Show JSON schema
{
   "title": "V1ModelTagsModelPage",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Model tags returned by search in page.",
         "default": [],
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1ModelTagsModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "example": {
      "items": [
         {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      ],
      "current_page": 1,
      "page_size": 100,
      "previous_page": null,
      "next_page": null,
      "has_previous": false,
      "previous_items": 0,
      "has_next": false,
      "total": 1,
      "pages": 1
   },
   "definitions": {
      "V1ModelTagsModel": {
         "title": "V1ModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model tag.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model",
               "type": "string"
            }
         },
         "required": [
            "name",
            "value",
            "status"
         ],
         "example": {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘items’: [{‘uuid’: ‘xyz-789-rst-456’, ‘model_uuid’: ‘abc-123-def-456’, ‘name’: ‘Example Model Tag’, ‘value’: {‘key’: ‘value’}, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user1’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}

Fields:
field items: List[V1ModelTagsModel] = []

Model tags returned by search in page.

pydantic model V1ModelTagsSearch

Bases: V1PageSearch

Show JSON schema
{
   "title": "V1ModelTagsSearch",
   "type": "object",
   "properties": {
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Apply different condition to filter the results",
         "default": {
            "created_by": null,
            "modified_by": null,
            "created_ts_start": null,
            "created_ts_end": null,
            "modified_ts_start": null,
            "modified_ts_end": null,
            "uuid": null,
            "name": null,
            "status": null,
            "model_uuid": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/V1ModelTagsFilters"
            }
         ]
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 100,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "search": "vianai",
      "filters": {
         "uuids": [
            "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "9140dd05-3f7a-49a4-b625-379880bd9606"
         ],
         "names": [
            "Example Model Tag"
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1ModelTagsFilters": {
         "title": "V1ModelTagsFilters",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "model_uuids": {
               "title": "Model Uuids",
               "description": "List of model versions for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "example": {
            "uuids": [
               "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
               "9140dd05-3f7a-49a4-b625-379880bd9606"
            ],
            "names": [
               "Example Tag 1"
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘search’: ‘vianai’, ‘filters’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example Model Tag’]}}}

Fields:
field filters: V1ModelTagsFilters | None = V1ModelTagsFilters(created_by=None, modified_by=None, created_ts_start=None, created_ts_end=None, modified_ts_start=None, modified_ts_end=None, uuid=None, name=None, status=None, model_uuid=None)

Apply different condition to filter the results

pydantic model V1ModelTagsUpdates

Bases: BaseModel

Show JSON schema
{
   "title": "V1ModelTagsUpdates",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "Name of the model tag.",
         "type": "string"
      },
      "value": {
         "title": "Value",
         "description": "Value of the model tag.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "string"
            },
            {
               "type": "object"
            }
         ]
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "allOf": [
            {
               "$ref": "#/definitions/V1ModelTagsFilters"
            }
         ]
      }
   },
   "required": [
      "filters"
   ],
   "example": {
      "name": "Example Update Tag 1",
      "value": {
         "key2": "value2"
      },
      "filters": {
         "uuids": [
            "5efc9544-e84a-4a94-9e6d-5774e1c609ab"
         ],
         "names": [
            "Example Tag 1"
         ]
      }
   },
   "definitions": {
      "V1ModelTagsFilters": {
         "title": "V1ModelTagsFilters",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "model_uuids": {
               "title": "Model Uuids",
               "description": "List of model versions for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "example": {
            "uuids": [
               "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
               "9140dd05-3f7a-49a4-b625-379880bd9606"
            ],
            "names": [
               "Example Tag 1"
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘name’: ‘Example Update Tag 1’, ‘value’: {‘key2’: ‘value2’}, ‘filters’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’], ‘names’: [‘Example Tag 1’]}}}

Fields:
Validators:
field filters: V1ModelTagsFilters [Required]

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

field name: str | None = None

Name of the model tag.

field value: float | int | str | dict | None = None

Value of the model tag.

Validated by:
validator value_float_or_int  »  value
class V1TagsNames(value)

Bases: Enum

An enumeration.

ALL_COLUMNS = 'allcolumns'
CATEGORICAL_COLUMNS = 'categoricalcolumns'
CLASS_WEIGHTS = 'class_weights'
CONTEXT_COLUMN_NAME = 'context_column_name'
CONTINUOUS_COLUMNS = 'continuouscolumns'
DATASET_SEGMENT_FEATURE_NAMES = 'dataset_segment_feature_names'
DECISION_THRESHOLD = 'decision_threshold'
DEFAULT_GROUND_TRUTH = 'default_ground_truth'
EXPERIMENT_TYPE = 'experiment_type'
FEATURE_EMBEDDINGS_COLUMN_NAMES = 'feature_embeddings_column_names'
FEATURE_GROUPS = 'feature_groups'
FEATURE_IMPORTANCE = 'feature_importance'
GROUND_TRUTH_COLUMN_NAME = 'ground_truth_column_name'
GROUP_ID_COLUMN_NAME = 'group_id_column_name'
IDENTIFIER_COLUMN = 'identifier_column'

For future use

IMAGE_EMBEDDING = 'image_embedding'
INPUT_COLUMN_NAME = 'input_column_name'
INTEREST_CLASS = 'interest_class'
LM_OUTPUT_COLUMN_NAME = 'lm_output_column_name'
MODEL_CLASS = 'model_class'
MODEL_FILE = 'model_file'
MODEL_NAME = 'model_name'
MODEL_PREDICT_DATE = 'model_predict_date'
PREDICTED_PROBABILITIES_COLUMN_NAMES = 'predicted_probabilities_column_names'
PREDICTION_ACTUAL_VALUES = 'prediction_actual_values'
PREDICTION_LABELS = 'prediction_labels'
PREDICT_METADATA = 'predict_metadata'
PROMPT_COLUMN_NAME = 'prompt_column_name'
RANK_COLUMN_NAME = 'rank_column_name'
RAW_IMAGE_VECTOR = 'raw_image_vector'
RELEVANCE_LABEL_COLUMN_NAME = 'relevance_label_column_name'
RELEVANCE_SCORE_COLUMN_NAME = 'relevance_score_column_name'
TARGET_COLUMN = 'targetcolumn'
TEST_SET = 'test_set'
TIMESTAMP_COLUMN_NAME = 'timestamp_column_name'
TRAIN_SET = 'train_set'
VALIDATION_SET = 'validation_set'

vianops_client.models.modelstore.models

pydantic model V1BaseModelsModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1BaseModelsModel",
   "type": "object",
   "properties": {
      "version": {
         "title": "Version",
         "description": "Model version",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Model status",
         "type": "string"
      },
      "stage": {
         "title": "Stage",
         "description": "Model stage",
         "type": "string"
      },
      "project_uuid": {
         "title": "Project Uuid",
         "description": "Project uuid associated with the model.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Unix time in milliseconds generated at creation time.",
         "type": "string",
         "format": "date-time"
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Unix time in milliseconds generated at last modification time.",
         "type": "string",
         "format": "date-time"
      },
      "created_by": {
         "title": "Created By",
         "description": "User that created the model.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User that modified the model.",
         "type": "string"
      }
   },
   "example": {
      "version": "1.0",
      "stage": "Example model stage",
      "status": "active",
      "project_uuid": "0",
      "created_ts": 1675292368,
      "modified_ts": 1675292368,
      "created_by": "user1",
      "modified_by": "user1"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘version’: ‘1.0’, ‘stage’: ‘Example model stage’, ‘status’: ‘active’, ‘project_uuid’: ‘0’, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user1’}}

Fields:
field created_by: str | None = None

User that created the model.

field created_ts: datetime | None = None

Unix time in milliseconds generated at creation time.

field modified_by: str | None = None

User that modified the model.

field modified_ts: datetime | None = None

Unix time in milliseconds generated at last modification time.

field project_uuid: str | None = None

Project uuid associated with the model.

field stage: str | None = None

Model stage

field status: str | None = None

Model status

field version: str | None = None

Model version

pydantic model V1ExplainSessionResponse

Bases: BaseModel

Show JSON schema
{
   "title": "V1ExplainSessionResponse",
   "type": "object",
   "properties": {
      "job_status": {
         "title": "Job Status",
         "description": "Status of explainer job",
         "type": "string"
      },
      "explainer_job_id": {
         "title": "Explainer Job Id",
         "description": "job id of the explainer job",
         "type": "string"
      },
      "message": {
         "title": "Message",
         "description": "messege response for explain session",
         "type": "string"
      }
   }
}

Fields:
field explainer_job_id: str | None = None

job id of the explainer job

field job_status: str | None = None

Status of explainer job

field message: str | None = None

messege response for explain session

pydantic model V1ModelSearch

Bases: V1PageSearch

Show JSON schema
{
   "title": "V1ModelSearch",
   "type": "object",
   "properties": {
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "default": {
            "created_by": null,
            "modified_by": null,
            "created_ts_start": null,
            "created_ts_end": null,
            "modified_ts_start": null,
            "modified_ts_end": null,
            "uuid": null,
            "name": null,
            "status": null,
            "version": null,
            "stage": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/V1ModelsFilters"
            }
         ]
      },
      "include_tags": {
         "title": "Include Tags",
         "description": "If `true` returns defined models tags with search results; otherwise, `false` (default value).",
         "default": false,
         "type": "boolean"
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 100,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "search": "vianai",
      "filters": {
         "uuids": [
            "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "9140dd05-3f7a-49a4-b625-379880bd9606"
         ],
         "names": [
            "Example model 1"
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1ModelsFilters": {
         "title": "V1ModelsFilters",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "versions": {
               "title": "Versions",
               "description": "List of model versions for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "stages": {
               "title": "Stages",
               "description": "List of model stages for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "example": {
            "uuids": [
               "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
               "9140dd05-3f7a-49a4-b625-379880bd9606"
            ],
            "names": [
               "Example model 1"
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘search’: ‘vianai’, ‘filters’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example model 1’]}}}

Fields:
field filters: V1ModelsFilters | None = V1ModelsFilters(created_by=None, modified_by=None, created_ts_start=None, created_ts_end=None, modified_ts_start=None, modified_ts_end=None, uuid=None, name=None, status=None, version=None, stage=None)

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

field include_tags: bool | None = False

If true returns defined models tags with search results; otherwise, false (default value).

pydantic model V1ModelUpdates

Bases: V1BaseModelsModel

Show JSON schema
{
   "title": "V1ModelUpdates",
   "type": "object",
   "properties": {
      "version": {
         "title": "Version",
         "description": "Model version",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Model status",
         "type": "string"
      },
      "stage": {
         "title": "Stage",
         "description": "Model stage",
         "type": "string"
      },
      "project_uuid": {
         "title": "Project Uuid",
         "description": "Project uuid associated with the model.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Unix time in milliseconds generated at creation time.",
         "type": "string",
         "format": "date-time"
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Unix time in milliseconds generated at last modification time.",
         "type": "string",
         "format": "date-time"
      },
      "created_by": {
         "title": "Created By",
         "description": "User that created the model.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User that modified the model.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "allOf": [
            {
               "$ref": "#/definitions/V1ModelsFilters"
            }
         ]
      }
   },
   "example": {
      "version": "2.0",
      "stage": "New model stage",
      "filters": {
         "uuids": [
            "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "9140dd05-3f7a-49a4-b625-379880bd9606"
         ],
         "names": [
            "Example model 1"
         ]
      }
   },
   "definitions": {
      "V1ModelsFilters": {
         "title": "V1ModelsFilters",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "versions": {
               "title": "Versions",
               "description": "List of model versions for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "stages": {
               "title": "Stages",
               "description": "List of model stages for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "example": {
            "uuids": [
               "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
               "9140dd05-3f7a-49a4-b625-379880bd9606"
            ],
            "names": [
               "Example model 1"
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘version’: ‘2.0’, ‘stage’: ‘New model stage’, ‘filters’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example model 1’]}}}

Fields:
field filters: V1ModelsFilters | None = None

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

pydantic model V1ModelsFilters

Bases: V1Filters

Show JSON schema
{
   "title": "V1ModelsFilters",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of uuids for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of names for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of statuses for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "versions": {
         "title": "Versions",
         "description": "List of model versions for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "stages": {
         "title": "Stages",
         "description": "List of model stages for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      }
   },
   "example": {
      "uuids": [
         "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
         "9140dd05-3f7a-49a4-b625-379880bd9606"
      ],
      "names": [
         "Example model 1"
      ]
   }
}

Config:
  • fields: dict = {‘uuid’: ‘uuids’, ‘name’: ‘names’, ‘version’: ‘versions’, ‘stage’: ‘stages’, ‘status’: ‘statuses’, ‘created_by’: ‘created_bys’, ‘modified_by’: ‘modified_bys’}

  • schema_extra: dict = {‘example’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example model 1’]}}

Fields:
field stage: List[str] | None = None (alias 'stages')

List of model stages for this operation.

field version: List[str] | None = None (alias 'versions')

List of model versions for this operation.

pydantic model V1ModelsModel

Bases: V1BaseModelsModel

Show JSON schema
{
   "title": "V1ModelsModel",
   "type": "object",
   "properties": {
      "version": {
         "title": "Version",
         "description": "Model version",
         "type": "string"
      },
      "status": {
         "title": "Status",
         "description": "Model status",
         "type": "string"
      },
      "stage": {
         "title": "Stage",
         "description": "Model stage",
         "type": "string"
      },
      "project_uuid": {
         "title": "Project Uuid",
         "description": "Project uuid associated with the model.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Unix time in milliseconds generated at creation time.",
         "type": "string",
         "format": "date-time"
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Unix time in milliseconds generated at last modification time.",
         "type": "string",
         "format": "date-time"
      },
      "created_by": {
         "title": "Created By",
         "description": "User that created the model.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User that modified the model.",
         "type": "string"
      },
      "uuid": {
         "title": "Uuid",
         "description": "UUID of the model.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the model",
         "type": "string"
      },
      "tags": {
         "title": "Tags",
         "description": "Model tags associated with the model.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1ModelTagsModel"
         }
      }
   },
   "required": [
      "name"
   ],
   "example": {
      "uuid": "0",
      "name": "Example Model",
      "version": "1.0",
      "stage": "Example model stage",
      "status": "active",
      "project_uuid": "0",
      "created_ts": 1675292368,
      "modified_ts": 1675292368,
      "created_by": "user1",
      "modified_by": "user1"
   },
   "definitions": {
      "V1ModelTagsModel": {
         "title": "V1ModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model tag.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model",
               "type": "string"
            }
         },
         "required": [
            "name",
            "value",
            "status"
         ],
         "example": {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘0’, ‘name’: ‘Example Model’, ‘version’: ‘1.0’, ‘stage’: ‘Example model stage’, ‘status’: ‘active’, ‘project_uuid’: ‘0’, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user1’}}

Fields:
field name: str [Required]

Name of the model

field tags: List[V1ModelTagsModel] | None = None

Model tags associated with the model.

field uuid: str | None = None

UUID of the model.

pydantic model V1ModelsModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1ModelsModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1ModelsModel"
   },
   "definitions": {
      "V1ModelTagsModel": {
         "title": "V1ModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model tag.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model",
               "type": "string"
            }
         },
         "required": [
            "name",
            "value",
            "status"
         ],
         "example": {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      },
      "V1ModelsModel": {
         "title": "V1ModelsModel",
         "type": "object",
         "properties": {
            "version": {
               "title": "Version",
               "description": "Model version",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Model status",
               "type": "string"
            },
            "stage": {
               "title": "Stage",
               "description": "Model stage",
               "type": "string"
            },
            "project_uuid": {
               "title": "Project Uuid",
               "description": "Project uuid associated with the model.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "string",
               "format": "date-time"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "string",
               "format": "date-time"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model.",
               "type": "string"
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model",
               "type": "string"
            },
            "tags": {
               "title": "Tags",
               "description": "Model tags associated with the model.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1ModelTagsModel"
               }
            }
         },
         "required": [
            "name"
         ],
         "example": {
            "uuid": "0",
            "name": "Example Model",
            "version": "1.0",
            "stage": "Example model stage",
            "status": "active",
            "project_uuid": "0",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.models.V1ModelsModel])

pydantic model V1ModelsModelPage

Bases: V1PageModel

Show JSON schema
{
   "title": "V1ModelsModelPage",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Models returned by search in page.",
         "default": [],
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1ModelsModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "example": {
      "items": [
         {
            "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "Example Model 1",
            "version": "1.0",
            "stage": "0",
            "created_ts": 1675251260780.042,
            "modified_ts": null,
            "created_by": "user1",
            "modified_by": "user2"
         }
      ],
      "current_page": 1,
      "page_size": 100,
      "previous_page": null,
      "next_page": null,
      "has_previous": false,
      "previous_items": 0,
      "has_next": false,
      "total": 1,
      "pages": 1
   },
   "definitions": {
      "V1ModelTagsModel": {
         "title": "V1ModelTagsModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "UUID of the model that the tag is associated with.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model tag.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Value of the model tag.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "array",
                     "items": {}
                  },
                  {
                     "type": "array",
                     "items": {
                        "type": "object"
                     }
                  },
                  {
                     "type": "object"
                  }
               ]
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model tag.",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "number"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "number"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model",
               "type": "string"
            }
         },
         "required": [
            "name",
            "value",
            "status"
         ],
         "example": {
            "uuid": "xyz-789-rst-456",
            "model_uuid": "abc-123-def-456",
            "name": "Example Model Tag",
            "value": {
               "key": "value"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      },
      "V1ModelsModel": {
         "title": "V1ModelsModel",
         "type": "object",
         "properties": {
            "version": {
               "title": "Version",
               "description": "Model version",
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "Model status",
               "type": "string"
            },
            "stage": {
               "title": "Stage",
               "description": "Model stage",
               "type": "string"
            },
            "project_uuid": {
               "title": "Project Uuid",
               "description": "Project uuid associated with the model.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Unix time in milliseconds generated at creation time.",
               "type": "string",
               "format": "date-time"
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Unix time in milliseconds generated at last modification time.",
               "type": "string",
               "format": "date-time"
            },
            "created_by": {
               "title": "Created By",
               "description": "User that created the model.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User that modified the model.",
               "type": "string"
            },
            "uuid": {
               "title": "Uuid",
               "description": "UUID of the model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the model",
               "type": "string"
            },
            "tags": {
               "title": "Tags",
               "description": "Model tags associated with the model.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1ModelTagsModel"
               }
            }
         },
         "required": [
            "name"
         ],
         "example": {
            "uuid": "0",
            "name": "Example Model",
            "version": "1.0",
            "stage": "Example model stage",
            "status": "active",
            "project_uuid": "0",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user1"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘items’: [{‘uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘Example Model 1’, ‘version’: ‘1.0’, ‘stage’: ‘0’, ‘created_ts’: 1675251260780.042, ‘modified_ts’: None, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}

Fields:
field items: List[V1ModelsModel] = []

Models returned by search in page.

vianops_client.models.modelstore.policies

pydantic model V1Baseline

Bases: BaseModel

Show JSON schema
{
   "title": "V1Baseline",
   "type": "object",
   "properties": {
      "window_method": {
         "title": "Window Method",
         "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
         "type": "string"
      },
      "window_type": {
         "title": "Window Type",
         "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
         "type": "string"
      },
      "last_amount": {
         "title": "Last Amount",
         "description": "The last amount of `prior` or `last` for the given window type.",
         "type": "integer"
      },
      "process_date": {
         "title": "Process Date",
         "description": "The process date.",
         "type": "string"
      },
      "offset_type": {
         "title": "Offset Type",
         "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
         "type": "string"
      },
      "offset": {
         "title": "Offset",
         "description": "The offset amount.",
         "type": "integer"
      },
      "start_of_week": {
         "title": "Start Of Week",
         "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
         "type": "string"
      },
      "quarter_start": {
         "title": "Quarter Start",
         "description": "The date to start the quarter.",
         "type": "string"
      },
      "year_start": {
         "title": "Year Start",
         "description": "The date to start the year.",
         "type": "string"
      }
   },
   "required": [
      "window_method",
      "window_type"
   ]
}

Fields:
field last_amount: int | None = None

The last amount of prior or last for the given window type.

field offset: int | None = None

The offset amount.

field offset_type: str | None = None

The policy`s offset type. Supported values: week, month, and quarter.

field process_date: str | None = None

The process date.

field quarter_start: str | None = None

The date to start the quarter.

field start_of_week: str | None = None

The start day of week. Supported values: monday, tuesday, wednesday, thursday, friday, saturday, sunday.

field window_method: str [Required]

The window method. Supported values: prior, last, same_prior_year, training .

field window_type: str [Required]

The baseline window type. Supported values: day, week, month, quarter, year, training.

field year_start: str | None = None

The date to start the year.

pydantic model V1DriftPolicy

Bases: V1PolicyCommon

Show JSON schema
{
   "title": "V1DriftPolicy",
   "type": "object",
   "properties": {
      "window_parameters": {
         "title": "Window Parameters",
         "description": "The window parameters, which include the target and baseline parameters.",
         "allOf": [
            {
               "$ref": "#/definitions/V1WindowParameters"
            }
         ]
      },
      "warning_level": {
         "title": "Warning Level",
         "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ]
      },
      "critical_level": {
         "title": "Critical Level",
         "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ]
      },
      "schedule": {
         "title": "Schedule",
         "description": "The cron scheduleer.",
         "type": "string"
      },
      "deployment_name": {
         "title": "Deployment Name",
         "description": "The name of the deployment the policy belongs to.",
         "type": "string"
      },
      "method": {
         "title": "Method",
         "description": "The drift method.",
         "type": "string"
      },
      "hotspot_analysis": {
         "title": "Hotspot Analysis",
         "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
         "default": {
            "method": "percent",
            "value": 100,
            "features": []
         },
         "allOf": [
            {
               "$ref": "#/definitions/V1HotspotParamsModel"
            }
         ]
      },
      "type": {
         "title": "Type",
         "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
         "type": "string"
      },
      "drift_type": {
         "title": "Drift Type",
         "description": "The type of drift. Supported values: `distance`, `windowed`.",
         "type": "string"
      },
      "select_features_type": {
         "title": "Select Features Type",
         "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
         "type": "string"
      },
      "feature_weightage": {
         "title": "Feature Weightage",
         "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
         "type": "string"
      },
      "feature_weights": {
         "title": "Feature Weights",
         "description": "The specific weight given to each feature.",
         "type": "object"
      },
      "drift_measure": {
         "title": "Drift Measure",
         "description": "The drift measure. Supported values: `PSI`, `JS`.",
         "type": "string"
      },
      "baseline_bins": {
         "title": "Baseline Bins",
         "description": "The custom bin dictionary for which to run drift against per feature.",
         "type": "object"
      }
   },
   "required": [
      "window_parameters",
      "warning_level",
      "critical_level",
      "schedule",
      "method",
      "type",
      "drift_type"
   ],
   "example": {
      "window_parameters": {
         "target": {
            "window_type": "week"
         },
         "baseline": {
            "window_method": "last",
            "window_type": "week",
            "last_amount": 2
         }
      },
      "warning_level": 0.1,
      "critical_level": 0.25,
      "schedule": "0 0 5 ? * *",
      "deployment_name": "d_mp_placeholder_deployment",
      "method": "preprocess",
      "hotspot": {
         "method": "flat",
         "value": 50,
         "features": [
            "a",
            "b",
            "c"
         ]
      }
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘warning_level’: 0.1, ‘critical_level’: 0.25, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’, ‘hotspot’: {‘method’: ‘flat’, ‘value’: 50, ‘features’: [‘a’, ‘b’, ‘c’]}}}

Fields:
field baseline_bins: dict | None = None

The custom bin dictionary for which to run drift against per feature.

field drift_measure: str | None = None

The drift measure. Supported values: PSI, JS.

field drift_type: str [Required]

The type of drift. Supported values: distance, windowed.

field feature_weightage: str | None = None

The weight category selected for the included features. Supported values: equal, manual.

field feature_weights: dict | None = None

The specific weight given to each feature.

field select_features_type: str | None = None

The features to be included in drift policy. Supported values: custom, all.

field type: str [Required]

The drift category. Supported values: feature-drift, prediction-drift.

pydantic model V1PerformancePolicy

Bases: V1PolicyCommon

Show JSON schema
{
   "title": "V1PerformancePolicy",
   "type": "object",
   "properties": {
      "window_parameters": {
         "title": "Window Parameters",
         "description": "The window parameters, which include the target and baseline parameters.",
         "allOf": [
            {
               "$ref": "#/definitions/V1WindowParameters"
            }
         ]
      },
      "warning_level": {
         "title": "Warning Level",
         "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ]
      },
      "critical_level": {
         "title": "Critical Level",
         "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ]
      },
      "schedule": {
         "title": "Schedule",
         "description": "The cron scheduleer.",
         "type": "string"
      },
      "deployment_name": {
         "title": "Deployment Name",
         "description": "The name of the deployment the policy belongs to.",
         "type": "string"
      },
      "method": {
         "title": "Method",
         "description": "The drift method.",
         "type": "string"
      },
      "hotspot_analysis": {
         "title": "Hotspot Analysis",
         "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
         "default": {
            "method": "percent",
            "value": 100,
            "features": []
         },
         "allOf": [
            {
               "$ref": "#/definitions/V1HotspotParamsModel"
            }
         ]
      },
      "metric": {
         "title": "Metric",
         "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
         "type": "string"
      },
      "ground_truth_threshold": {
         "title": "Ground Truth Threshold",
         "description": "The ground truth threshold value (percentage).",
         "type": "number"
      }
   },
   "required": [
      "window_parameters",
      "warning_level",
      "critical_level",
      "schedule",
      "method",
      "metric"
   ],
   "example": {
      "window_parameters": {
         "target": {
            "window_type": "week"
         },
         "baseline": {
            "window_method": "last",
            "window_type": "week",
            "last_amount": 2
         }
      },
      "warning_level": 0.1,
      "critical_level": 0.25,
      "schedule": "0 0 5 ? * *",
      "deployment_name": "d_mp_placeholder_deployment",
      "method": "preprocess",
      "hotspot": {
         "method": "flat",
         "value": 50,
         "features": [
            "a",
            "b",
            "c"
         ]
      }
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘warning_level’: 0.1, ‘critical_level’: 0.25, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’, ‘hotspot’: {‘method’: ‘flat’, ‘value’: 50, ‘features’: [‘a’, ‘b’, ‘c’]}}}

Fields:
field ground_truth_threshold: float | None = None

The ground truth threshold value (percentage).

field metric: str [Required]

The performance metric. See the User Guide ‘Metrics’ page for guidance.

pydantic model V1PolicyModel

Bases: V1PolicyRequestModel

Show JSON schema
{
   "title": "V1PolicyModel",
   "type": "object",
   "properties": {
      "deployment": {
         "title": "Deployment",
         "description": "Name of the deployment for this policy.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Name of the model for this policy.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version for this policy.",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage for this policy.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the policy set by user. This is a NULLABLE field.",
         "type": "string"
      },
      "type": {
         "title": "Type",
         "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
         "default": "drift",
         "type": "string"
      },
      "policy": {
         "title": "Policy",
         "description": "The JSON representation of the policy.",
         "anyOf": [
            {
               "$ref": "#/definitions/V1PerformancePolicy"
            },
            {
               "$ref": "#/definitions/V1DriftPolicy"
            }
         ]
      },
      "status": {
         "title": "Status",
         "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `delete`.",
         "type": "string"
      },
      "segments": {
         "title": "Segments",
         "description": "List of segments used by the policy. An empty list means no segments are used by this policy; if `null`, the operation did not ask for the segments to be included.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentModel"
         }
      },
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier for policy.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Timestamp of when the segment was created. Should not be changed after creation.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "created_by": {
         "title": "Created By",
         "description": "String representation of the username that created the row. This should be only added on insert and never modified.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "String representation of the username of the last user to update the row. When the row is created this should be equal to the created_by.",
         "type": "string"
      }
   },
   "required": [
      "model_name",
      "name"
   ],
   "example": {
      "uuid": "0",
      "deployment": "deployment_name",
      "model_name": "model_name",
      "model_version": "1",
      "model_stage": "string",
      "name": "Example Policy Name",
      "description": "Description of policy",
      "type": "drift",
      "policy": {
         "type": "feature-drift",
         "drift_type": "distance",
         "window_parameters": {
            "target": {
               "window_type": "day"
            },
            "baseline": {
               "window_method": "prior",
               "window_type": "day"
            }
         },
         "select_features_type": "custom",
         "feature_weightage": "equal",
         "feature_weights": {
            "feature_a": 25,
            "feature_b": 25
         },
         "drift_measure": "distance_JS",
         "warning_level": 0.1,
         "critical_level": 0.25,
         "schedule": "0 0 0 ? * *",
         "method": "preprocess"
      },
      "status": "active",
      "created_ts": 1675292368,
      "modified_ts": 1675292368,
      "created_by": "user1",
      "modified_by": "user2"
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘0’, ‘deployment’: ‘deployment_name’, ‘model_name’: ‘model_name’, ‘model_version’: ‘1’, ‘model_stage’: ‘string’, ‘name’: ‘Example Policy Name’, ‘description’: ‘Description of policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 25, ‘feature_b’: 25}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 0.1, ‘critical_level’: 0.25, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘preprocess’}, ‘status’: ‘active’, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}

Fields:
field created_by: str | None = None

String representation of the username that created the row. This should be only added on insert and never modified.

field created_ts: float | datetime | None = None

Timestamp of when the segment was created. Should not be changed after creation.

field modified_by: str | None = None

String representation of the username of the last user to update the row. When the row is created this should be equal to the created_by.

field modified_ts: float | datetime | None = None

Timestamp of when a segment was updated. Initial timestamp at creation will be the same as created_ts.

field uuid: str | None = None

Unique identifier for policy.

pydantic model V1PolicyModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1PolicyModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1PolicyModel"
   },
   "example": [
      {
         "uuid": "0",
         "deployment": "deployment_name",
         "model_name": "model_name",
         "model_version": "1",
         "model_stage": "primary",
         "name": "Example Policy Name",
         "description": "Policy Description",
         "type": "drift",
         "policy": {
            "type": "feature-drift",
            "drift_type": "distance",
            "window_parameters": {
               "target": {
                  "window_type": "day"
               },
               "baseline": {
                  "window_method": "prior",
                  "window_type": "day"
               }
            },
            "select_features_type": "custom",
            "feature_weightage": "equal",
            "feature_weights": {
               "feature_a": 25,
               "feature_b": 25
            },
            "drift_measure": "distance_JS",
            "warning_level": 1,
            "critical_level": 2,
            "schedule": "0 0 0 ? * *",
            "method": "preprocess"
         },
         "status": "active",
         "created_ts": 1675292368,
         "modified_ts": 1675292368,
         "created_by": "user1",
         "modified_by": "user2"
      }
   ],
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      },
      "V1PolicyModel": {
         "title": "V1PolicyModel",
         "type": "object",
         "properties": {
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment for this policy.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model for this policy.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version for this policy.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage for this policy.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the policy set by user. This is a NULLABLE field.",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
               "default": "drift",
               "type": "string"
            },
            "policy": {
               "title": "Policy",
               "description": "The JSON representation of the policy.",
               "anyOf": [
                  {
                     "$ref": "#/definitions/V1PerformancePolicy"
                  },
                  {
                     "$ref": "#/definitions/V1DriftPolicy"
                  }
               ]
            },
            "status": {
               "title": "Status",
               "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `delete`.",
               "type": "string"
            },
            "segments": {
               "title": "Segments",
               "description": "List of segments used by the policy. An empty list means no segments are used by this policy; if `null`, the operation did not ask for the segments to be included.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentModel"
               }
            },
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier for policy.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp of when the segment was created. Should not be changed after creation.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "String representation of the username that created the row. This should be only added on insert and never modified.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "String representation of the username of the last user to update the row. When the row is created this should be equal to the created_by.",
               "type": "string"
            }
         },
         "required": [
            "model_name",
            "name"
         ],
         "example": {
            "uuid": "0",
            "deployment": "deployment_name",
            "model_name": "model_name",
            "model_version": "1",
            "model_stage": "string",
            "name": "Example Policy Name",
            "description": "Description of policy",
            "type": "drift",
            "policy": {
               "type": "feature-drift",
               "drift_type": "distance",
               "window_parameters": {
                  "target": {
                     "window_type": "day"
                  },
                  "baseline": {
                     "window_method": "prior",
                     "window_type": "day"
                  }
               },
               "select_features_type": "custom",
               "feature_weightage": "equal",
               "feature_weights": {
                  "feature_a": 25,
                  "feature_b": 25
               },
               "drift_measure": "distance_JS",
               "warning_level": 0.1,
               "critical_level": 0.25,
               "schedule": "0 0 0 ? * *",
               "method": "preprocess"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: [{‘uuid’: ‘0’, ‘deployment’: ‘deployment_name’, ‘model_name’: ‘model_name’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Example Policy Name’, ‘description’: ‘Policy Description’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 25, ‘feature_b’: 25}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 1, ‘critical_level’: 2, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘preprocess’}, ‘status’: ‘active’, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}]}

Fields:
  • __root__ (List[vianops_client.models.modelstore.policies.V1PolicyModel])

pydantic model V1PolicyModelPage

Bases: V1PageModel

Show JSON schema
{
   "title": "V1PolicyModelPage",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1PolicyModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "required": [
      "items"
   ],
   "example": {
      "items": [
         {
            "uuid": "0",
            "deployment": "string",
            "model_name": "string",
            "model_version": "1",
            "model_stage": "string",
            "name": "string",
            "description": "Description of policy",
            "type": "drift",
            "policy": {
               "type": "feature-drift",
               "drift_type": "distance",
               "window_parameters": {
                  "target": {
                     "window_type": "day"
                  },
                  "baseline": {
                     "window_method": "prior",
                     "window_type": "day"
                  }
               },
               "select_features_type": "custom",
               "feature_weightage": "equal",
               "feature_weights": {
                  "feature_a": 50,
                  "feature_b": 50
               },
               "drift_measure": "distance_JS",
               "warning_level": 1,
               "critical_level": 2,
               "schedule": "0 0 0 ? * *",
               "method": "histogram"
            },
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user2"
         }
      ],
      "current_page": 1,
      "page_size": 100,
      "previous_page": null,
      "next_page": null,
      "has_previous": false,
      "previous_items": 0,
      "has_next": false,
      "total": 1,
      "pages": 1
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      },
      "V1PolicyModel": {
         "title": "V1PolicyModel",
         "type": "object",
         "properties": {
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment for this policy.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model for this policy.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version for this policy.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage for this policy.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the policy set by user. This is a NULLABLE field.",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
               "default": "drift",
               "type": "string"
            },
            "policy": {
               "title": "Policy",
               "description": "The JSON representation of the policy.",
               "anyOf": [
                  {
                     "$ref": "#/definitions/V1PerformancePolicy"
                  },
                  {
                     "$ref": "#/definitions/V1DriftPolicy"
                  }
               ]
            },
            "status": {
               "title": "Status",
               "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `delete`.",
               "type": "string"
            },
            "segments": {
               "title": "Segments",
               "description": "List of segments used by the policy. An empty list means no segments are used by this policy; if `null`, the operation did not ask for the segments to be included.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentModel"
               }
            },
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier for policy.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp of when the segment was created. Should not be changed after creation.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "String representation of the username that created the row. This should be only added on insert and never modified.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "String representation of the username of the last user to update the row. When the row is created this should be equal to the created_by.",
               "type": "string"
            }
         },
         "required": [
            "model_name",
            "name"
         ],
         "example": {
            "uuid": "0",
            "deployment": "deployment_name",
            "model_name": "model_name",
            "model_version": "1",
            "model_stage": "string",
            "name": "Example Policy Name",
            "description": "Description of policy",
            "type": "drift",
            "policy": {
               "type": "feature-drift",
               "drift_type": "distance",
               "window_parameters": {
                  "target": {
                     "window_type": "day"
                  },
                  "baseline": {
                     "window_method": "prior",
                     "window_type": "day"
                  }
               },
               "select_features_type": "custom",
               "feature_weightage": "equal",
               "feature_weights": {
                  "feature_a": 25,
                  "feature_b": 25
               },
               "drift_measure": "distance_JS",
               "warning_level": 0.1,
               "critical_level": 0.25,
               "schedule": "0 0 0 ? * *",
               "method": "preprocess"
            },
            "status": "active",
            "created_ts": 1675292368,
            "modified_ts": 1675292368,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘items’: [{‘uuid’: ‘0’, ‘deployment’: ‘string’, ‘model_name’: ‘string’, ‘model_version’: ‘1’, ‘model_stage’: ‘string’, ‘name’: ‘string’, ‘description’: ‘Description of policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 50, ‘feature_b’: 50}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 1, ‘critical_level’: 2, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘histogram’}, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}

Fields:
field items: List[V1PolicyModel] [Required]
pydantic model V1PolicyModelSearch

Bases: V1PolicyModelSearchFilters

Show JSON schema
{
   "title": "V1PolicyModelSearch",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of uuids for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of names for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of statuses for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "deployments": {
         "title": "Deployments",
         "description": "List of deployments",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_names": {
         "title": "Model Names",
         "description": "List of model names.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_versions": {
         "title": "Model Versions",
         "description": "List of model versions.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_stages": {
         "title": "Model Stages",
         "description": "List of model stages.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "types": {
         "title": "Types",
         "description": "List of types (e.g., `drift` and `performance`).",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "include_segments": {
         "title": "Include Segments",
         "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.",
         "default": false,
         "type": "boolean"
      }
   },
   "example": {
      "filters": {
         "uuids": [
            "0",
            "1",
            "2"
         ],
         "deployments": [
            "deployments_name_1",
            "deployments_name_2"
         ]
      },
      "include_segments": true
   }
}

Config:
  • fields: dict = {‘uuid’: ‘uuids’, ‘deployment’: ‘deployments’, ‘model_name’: ‘model_names’, ‘model_version’: ‘model_versions’, ‘model_stage’: ‘model_stages’, ‘type’: ‘types’, ‘name’: ‘names’, ‘status’: ‘statuses’, ‘created_by’: ‘created_bys’, ‘modified_by’: ‘modified_bys’}

  • schema_extra: dict = {‘example’: {‘filters’: {‘uuids’: [‘0’, ‘1’, ‘2’], ‘deployments’: [‘deployments_name_1’, ‘deployments_name_2’]}, ‘include_segments’: True}}

Fields:
field include_segments: bool | None = False

Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.

pydantic model V1PolicyRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1PolicyRequestModel",
   "type": "object",
   "properties": {
      "deployment": {
         "title": "Deployment",
         "description": "Name of the deployment for this policy.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Name of the model for this policy.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version for this policy.",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage for this policy.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the policy set by user. This is a NULLABLE field.",
         "type": "string"
      },
      "type": {
         "title": "Type",
         "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
         "default": "drift",
         "type": "string"
      },
      "policy": {
         "title": "Policy",
         "description": "The JSON representation of the policy.",
         "anyOf": [
            {
               "$ref": "#/definitions/V1PerformancePolicy"
            },
            {
               "$ref": "#/definitions/V1DriftPolicy"
            }
         ]
      },
      "status": {
         "title": "Status",
         "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `delete`.",
         "type": "string"
      },
      "segments": {
         "title": "Segments",
         "description": "List of segments used by the policy. An empty list means no segments are used by this policy; if `null`, the operation did not ask for the segments to be included.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentModel"
         }
      }
   },
   "required": [
      "model_name",
      "name"
   ],
   "example": {
      "deployment": "d_mp_placeholder_deployment",
      "model_name": "d_mp_placeholder_deployment",
      "model_version": "1",
      "model_stage": "primary",
      "name": "Policy Name",
      "description": "Description of Policy",
      "type": "drift",
      "policy": {
         "type": "feature-drift",
         "drift_type": "distance",
         "window_parameters": {
            "target": {
               "window_type": "week"
            },
            "baseline": {
               "window_method": "last",
               "window_type": "week",
               "last_amount": 2
            }
         },
         "select_features_type": "custom",
         "feature_weightage": "equal",
         "feature_weights": {
            "trip_distance": 25,
            "travel_time": 25,
            "est_fare_amount": 25,
            "extra": 25
         },
         "drift_measure": "PSI",
         "warning_level": 0.1,
         "critical_level": 0.25,
         "schedule": "0 0 5 ? * *",
         "deployment_name": "d_mp_placeholder_deployment",
         "method": "preprocess"
      },
      "status": "inactive",
      "segments": [
         {
            "model_uuid": "ff0f98ae-5b59-48dd-8567-14efce48b4b4",
            "name": "d_mp_placeholder_deployment_segment_1",
            "description": "Segment Description",
            "filters": [
               {
                  "feature_name": "feature_name",
                  "value": [
                     "256",
                     "217"
                  ],
                  "operator": "=",
                  "conjunction": "and"
               }
            ],
            "id": 1,
            "status": "active",
            "created_ts": 1679496214358.969,
            "modified_ts": 1679496214358.969,
            "created_by": "vianai",
            "modified_by": "vianai"
         }
      ]
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘deployment’: ‘d_mp_placeholder_deployment’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name’, ‘description’: ‘Description of Policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 0.1, ‘critical_level’: 0.25, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’, ‘segments’: [{‘model_uuid’: ‘ff0f98ae-5b59-48dd-8567-14efce48b4b4’, ‘name’: ‘d_mp_placeholder_deployment_segment_1’, ‘description’: ‘Segment Description’, ‘filters’: [{‘feature_name’: ‘feature_name’, ‘value’: [‘256’, ‘217’], ‘operator’: ‘=’, ‘conjunction’: ‘and’}], ‘id’: 1, ‘status’: ‘active’, ‘created_ts’: 1679496214358.969, ‘modified_ts’: 1679496214358.969, ‘created_by’: ‘vianai’, ‘modified_by’: ‘vianai’}]}}

Fields:
field deployment: str | None = None

Name of the deployment for this policy.

field description: str | None = None

Description of the policy set by user. This is a NULLABLE field.

field model_name: str [Required]

Name of the model for this policy.

field model_stage: str | None = None

Model stage for this policy.

field model_version: str | None = None

Model version for this policy.

field name: str [Required]

Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.

field policy: V1PerformancePolicy | V1DriftPolicy = None

The JSON representation of the policy.

field segments: List[V1SegmentModel] | None = None

List of segments used by the policy. An empty list means no segments are used by this policy; if null, the operation did not ask for the segments to be included.

field status: str | None = None

Field to represent the status of a policy. This field is case-insensitive. Supported values: active, inactive, archived, delete.

field type: str | None = 'drift'

String representation of the type of policy. This field is case-insensitive. Supported values: drift, performance. Default value if not provided is drift.

pydantic model V1PolicyRequestModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1PolicyRequestModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1PolicyRequestModel"
   },
   "example": [
      {
         "deployment": "d_mp_placeholder_deployment_1",
         "model_name": "d_mp_placeholder_deployment",
         "model_version": "1",
         "model_stage": "primary",
         "name": "Policy Name for distance based drift",
         "description": "Policy Description",
         "type": "drift",
         "policy": {
            "type": "feature-drift",
            "drift_type": "distance",
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "select_features_type": "custom",
            "feature_weightage": "equal",
            "feature_weights": {
               "trip_distance": 25,
               "travel_time": 25,
               "est_fare_amount": 25,
               "extra": 25
            },
            "drift_measure": "PSI",
            "warning_level": 0.1,
            "critical_level": 0.15,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess"
         },
         "status": "inactive",
         "segments": [
            {
               "model_uuid": "string",
               "name": "d_mp_placeholder_deployment_segment_1",
               "description": "Segment Description",
               "filters": [
                  {
                     "feature_name": "feature_name",
                     "value": [
                        "256",
                        "217"
                     ],
                     "operator": "=",
                     "conjunction": "and"
                  }
               ],
               "id": 1,
               "status": "active",
               "created_ts": 1679496214358.969,
               "modified_ts": 1679496214358.969,
               "created_by": "vianai",
               "modified_by": "vianai"
            }
         ]
      },
      {
         "deployment": "d_mp_placeholder_deployment_2",
         "model_name": "d_mp_placeholder_deployment",
         "model_version": "1",
         "model_stage": "primary",
         "name": "Policy Name for window based drift.",
         "description": "Policy Description",
         "type": "drift",
         "policy": {
            "type": "feature-drift",
            "drift_type": "windowed",
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "select_features_type": "custom",
            "feature_weightage": "equal",
            "feature_weights": {
               "trip_distance": 25,
               "travel_time": 25,
               "est_fare_amount": 25,
               "extra": 25
            },
            "drift_measure": "PSI",
            "warning_level": 10,
            "critical_level": 15,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess"
         },
         "status": "inactive"
      },
      {
         "deployment": "d_mp_placeholder_deployment_3",
         "model_name": "d_mp_placeholder_deployment",
         "model_version": "1",
         "model_stage": "primary",
         "name": "Policy Name for performance",
         "description": "Description of Policy",
         "type": "performance",
         "policy": {
            "window_parameters": {
               "target": {
                  "window_type": "day"
               },
               "baseline": {
                  "window_method": "prior",
                  "window_type": "day"
               }
            },
            "metric": "mae",
            "warning_level": 0.1,
            "critical_level": 0.15,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess"
         },
         "status": "inactive"
      }
   ],
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      },
      "V1PolicyRequestModel": {
         "title": "V1PolicyRequestModel",
         "type": "object",
         "properties": {
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment for this policy.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model for this policy.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version for this policy.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage for this policy.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the policy set by user. This is a NULLABLE field.",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
               "default": "drift",
               "type": "string"
            },
            "policy": {
               "title": "Policy",
               "description": "The JSON representation of the policy.",
               "anyOf": [
                  {
                     "$ref": "#/definitions/V1PerformancePolicy"
                  },
                  {
                     "$ref": "#/definitions/V1DriftPolicy"
                  }
               ]
            },
            "status": {
               "title": "Status",
               "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `delete`.",
               "type": "string"
            },
            "segments": {
               "title": "Segments",
               "description": "List of segments used by the policy. An empty list means no segments are used by this policy; if `null`, the operation did not ask for the segments to be included.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentModel"
               }
            }
         },
         "required": [
            "model_name",
            "name"
         ],
         "example": {
            "deployment": "d_mp_placeholder_deployment",
            "model_name": "d_mp_placeholder_deployment",
            "model_version": "1",
            "model_stage": "primary",
            "name": "Policy Name",
            "description": "Description of Policy",
            "type": "drift",
            "policy": {
               "type": "feature-drift",
               "drift_type": "distance",
               "window_parameters": {
                  "target": {
                     "window_type": "week"
                  },
                  "baseline": {
                     "window_method": "last",
                     "window_type": "week",
                     "last_amount": 2
                  }
               },
               "select_features_type": "custom",
               "feature_weightage": "equal",
               "feature_weights": {
                  "trip_distance": 25,
                  "travel_time": 25,
                  "est_fare_amount": 25,
                  "extra": 25
               },
               "drift_measure": "PSI",
               "warning_level": 0.1,
               "critical_level": 0.25,
               "schedule": "0 0 5 ? * *",
               "deployment_name": "d_mp_placeholder_deployment",
               "method": "preprocess"
            },
            "status": "inactive",
            "segments": [
               {
                  "model_uuid": "ff0f98ae-5b59-48dd-8567-14efce48b4b4",
                  "name": "d_mp_placeholder_deployment_segment_1",
                  "description": "Segment Description",
                  "filters": [
                     {
                        "feature_name": "feature_name",
                        "value": [
                           "256",
                           "217"
                        ],
                        "operator": "=",
                        "conjunction": "and"
                     }
                  ],
                  "id": 1,
                  "status": "active",
                  "created_ts": 1679496214358.969,
                  "modified_ts": 1679496214358.969,
                  "created_by": "vianai",
                  "modified_by": "vianai"
               }
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: [{‘deployment’: ‘d_mp_placeholder_deployment_1’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for distance based drift’, ‘description’: ‘Policy Description’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 0.1, ‘critical_level’: 0.15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’, ‘segments’: [{‘model_uuid’: ‘string’, ‘name’: ‘d_mp_placeholder_deployment_segment_1’, ‘description’: ‘Segment Description’, ‘filters’: [{‘feature_name’: ‘feature_name’, ‘value’: [‘256’, ‘217’], ‘operator’: ‘=’, ‘conjunction’: ‘and’}], ‘id’: 1, ‘status’: ‘active’, ‘created_ts’: 1679496214358.969, ‘modified_ts’: 1679496214358.969, ‘created_by’: ‘vianai’, ‘modified_by’: ‘vianai’}]}, {‘deployment’: ‘d_mp_placeholder_deployment_2’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for window based drift.’, ‘description’: ‘Policy Description’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘windowed’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 10, ‘critical_level’: 15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’}, {‘deployment’: ‘d_mp_placeholder_deployment_3’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for performance’, ‘description’: ‘Description of Policy’, ‘type’: ‘performance’, ‘policy’: {‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘metric’: ‘mae’, ‘warning_level’: 0.1, ‘critical_level’: 0.15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’}]}

Fields:
  • __root__ (List[vianops_client.models.modelstore.policies.V1PolicyRequestModel])

pydantic model V1PolicySearchRequest

Bases: V1PageSearch, V1PolicyModelSearch

Show JSON schema
{
   "title": "V1PolicySearchRequest",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "uuids": {
         "title": "Uuids",
         "description": "List of uuids for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of names for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of statuses for this operation.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "deployments": {
         "title": "Deployments",
         "description": "List of deployments",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_names": {
         "title": "Model Names",
         "description": "List of model names.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_versions": {
         "title": "Model Versions",
         "description": "List of model versions.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "model_stages": {
         "title": "Model Stages",
         "description": "List of model stages.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "types": {
         "title": "Types",
         "description": "List of types (e.g., `drift` and `performance`).",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "include_segments": {
         "title": "Include Segments",
         "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.",
         "default": false,
         "type": "boolean"
      },
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "allOf": [
            {
               "$ref": "#/definitions/V1PolicyModelSearch"
            }
         ]
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 100,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "filters": {
         "uuids": [
            "00",
            "11"
         ],
         "deployments": [
            "string1"
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1PolicyModelSearch": {
         "title": "V1PolicyModelSearch",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuids": {
               "title": "Uuids",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "deployments": {
               "title": "Deployments",
               "description": "List of deployments",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "model_names": {
               "title": "Model Names",
               "description": "List of model names.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "model_versions": {
               "title": "Model Versions",
               "description": "List of model versions.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "model_stages": {
               "title": "Model Stages",
               "description": "List of model stages.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "types": {
               "title": "Types",
               "description": "List of types (e.g., `drift` and `performance`).",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "include_segments": {
               "title": "Include Segments",
               "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.",
               "default": false,
               "type": "boolean"
            }
         },
         "example": {
            "filters": {
               "uuids": [
                  "0",
                  "1",
                  "2"
               ],
               "deployments": [
                  "deployments_name_1",
                  "deployments_name_2"
               ]
            },
            "include_segments": true
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘filters’: {‘uuids’: [‘00’, ‘11’], ‘deployments’: [‘string1’]}}}

Fields:
field filters: V1PolicyModelSearch | None = None

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

pydantic model V1PolicyUpdateModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1PolicyUpdateModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1PolicyUpdateRequestModel"
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PolicyUpdateRequestModel": {
         "title": "V1PolicyUpdateRequestModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier for policy.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment set by user. This is a NULLABLE field.",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
               "default": "drift",
               "type": "string"
            },
            "policy": {
               "title": "Policy",
               "description": "The JSON representation of the policy.",
               "anyOf": [
                  {
                     "$ref": "#/definitions/V1PerformancePolicy"
                  },
                  {
                     "$ref": "#/definitions/V1DriftPolicy"
                  }
               ]
            },
            "status": {
               "title": "Status",
               "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`,`delete`.",
               "type": "string"
            }
         },
         "example": {
            "uuid": "0",
            "description": "Description of policy",
            "type": "drift",
            "policy": {
               "type": "feature-drift",
               "drift_type": "distance",
               "window_parameters": {
                  "target": {
                     "window_type": "day"
                  },
                  "baseline": {
                     "window_method": "prior",
                     "window_type": "day"
                  }
               },
               "select_features_type": "custom",
               "feature_weightage": "equal",
               "feature_weights": {
                  "feature_a": 25,
                  "feature_b": 25,
                  "feature_c": 25,
                  "feature_d": 25
               },
               "drift_measure": "distance_JS",
               "warning_level": 1,
               "critical_level": 2,
               "schedule": "0 0 0 ? * *",
               "method": "histogram"
            },
            "status": "active"
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.policies.V1PolicyUpdateRequestModel])

pydantic model V1PolicyUpdateRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1PolicyUpdateRequestModel",
   "type": "object",
   "properties": {
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier for policy.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the segment set by user. This is a NULLABLE field.",
         "type": "string"
      },
      "type": {
         "title": "Type",
         "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.",
         "default": "drift",
         "type": "string"
      },
      "policy": {
         "title": "Policy",
         "description": "The JSON representation of the policy.",
         "anyOf": [
            {
               "$ref": "#/definitions/V1PerformancePolicy"
            },
            {
               "$ref": "#/definitions/V1DriftPolicy"
            }
         ]
      },
      "status": {
         "title": "Status",
         "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`,`delete`.",
         "type": "string"
      }
   },
   "example": {
      "uuid": "0",
      "description": "Description of policy",
      "type": "drift",
      "policy": {
         "type": "feature-drift",
         "drift_type": "distance",
         "window_parameters": {
            "target": {
               "window_type": "day"
            },
            "baseline": {
               "window_method": "prior",
               "window_type": "day"
            }
         },
         "select_features_type": "custom",
         "feature_weightage": "equal",
         "feature_weights": {
            "feature_a": 25,
            "feature_b": 25,
            "feature_c": 25,
            "feature_d": 25
         },
         "drift_measure": "distance_JS",
         "warning_level": 1,
         "critical_level": 2,
         "schedule": "0 0 0 ? * *",
         "method": "histogram"
      },
      "status": "active"
   },
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      },
      "V1WindowParameters": {
         "title": "V1WindowParameters",
         "type": "object",
         "properties": {
            "target": {
               "title": "Target",
               "description": "The target parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Target"
                  }
               ]
            },
            "baseline": {
               "title": "Baseline",
               "description": "The baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1Baseline"
                  }
               ]
            }
         },
         "required": [
            "target",
            "baseline"
         ]
      },
      "V1HotspotParamsModel": {
         "title": "V1HotspotParamsModel",
         "type": "object",
         "properties": {
            "method": {
               "title": "Method",
               "description": "Method for selecting top hotspot results. Currently supported values: `flat` (straight number limit) and `percent` (top value % of the hotspots results).",
               "enum": [
                  "flat",
                  "percent"
               ],
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.",
               "type": "integer"
            },
            "features": {
               "title": "Features",
               "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         },
         "required": [
            "method",
            "value",
            "features"
         ],
         "example": {
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1PerformancePolicy": {
         "title": "V1PerformancePolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "metric": {
               "title": "Metric",
               "description": "The performance metric. See the User Guide 'Metrics' page for guidance.",
               "type": "string"
            },
            "ground_truth_threshold": {
               "title": "Ground Truth Threshold",
               "description": "The ground truth threshold value (percentage).",
               "type": "number"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "metric"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      },
      "V1DriftPolicy": {
         "title": "V1DriftPolicy",
         "type": "object",
         "properties": {
            "window_parameters": {
               "title": "Window Parameters",
               "description": "The window parameters, which include the target and baseline parameters.",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1WindowParameters"
                  }
               ]
            },
            "warning_level": {
               "title": "Warning Level",
               "description": "The warning level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "critical_level": {
               "title": "Critical Level",
               "description": "The critical level value. For distance based drift and performance drift, the expected value type is a float. For window based drift, the expected value type is an integer.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ]
            },
            "schedule": {
               "title": "Schedule",
               "description": "The cron scheduleer.",
               "type": "string"
            },
            "deployment_name": {
               "title": "Deployment Name",
               "description": "The name of the deployment the policy belongs to.",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "The drift method.",
               "type": "string"
            },
            "hotspot_analysis": {
               "title": "Hotspot Analysis",
               "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include.",
               "default": {
                  "method": "percent",
                  "value": 100,
                  "features": []
               },
               "allOf": [
                  {
                     "$ref": "#/definitions/V1HotspotParamsModel"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.",
               "type": "string"
            },
            "drift_type": {
               "title": "Drift Type",
               "description": "The type of drift. Supported values: `distance`, `windowed`.",
               "type": "string"
            },
            "select_features_type": {
               "title": "Select Features Type",
               "description": "The features to be included in drift policy. Supported values: `custom`, `all`.",
               "type": "string"
            },
            "feature_weightage": {
               "title": "Feature Weightage",
               "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.",
               "type": "string"
            },
            "feature_weights": {
               "title": "Feature Weights",
               "description": "The specific weight given to each feature.",
               "type": "object"
            },
            "drift_measure": {
               "title": "Drift Measure",
               "description": "The drift measure. Supported values: `PSI`, `JS`.",
               "type": "string"
            },
            "baseline_bins": {
               "title": "Baseline Bins",
               "description": "The custom bin dictionary for which to run drift against per feature.",
               "type": "object"
            }
         },
         "required": [
            "window_parameters",
            "warning_level",
            "critical_level",
            "schedule",
            "method",
            "type",
            "drift_type"
         ],
         "example": {
            "window_parameters": {
               "target": {
                  "window_type": "week"
               },
               "baseline": {
                  "window_method": "last",
                  "window_type": "week",
                  "last_amount": 2
               }
            },
            "warning_level": 0.1,
            "critical_level": 0.25,
            "schedule": "0 0 5 ? * *",
            "deployment_name": "d_mp_placeholder_deployment",
            "method": "preprocess",
            "hotspot": {
               "method": "flat",
               "value": 50,
               "features": [
                  "a",
                  "b",
                  "c"
               ]
            }
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘uuid’: ‘0’, ‘description’: ‘Description of policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 25, ‘feature_b’: 25, ‘feature_c’: 25, ‘feature_d’: 25}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 1, ‘critical_level’: 2, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘histogram’}, ‘status’: ‘active’}}

Fields:
field description: str | None = None

Description of the segment set by user. This is a NULLABLE field.

field policy: V1PerformancePolicy | V1DriftPolicy | None = None

The JSON representation of the policy.

field status: str | None = None

Field to represent the status of a policy. This field is case-insensitive. Supported values: active, inactive, archived,`delete`.

field type: str | None = 'drift'

String representation of the type of policy. This field is case-insensitive. Supported values: drift, performance. Default value if not provided is drift.

field uuid: str = None

Unique identifier for policy.

pydantic model V1Target

Bases: BaseModel

Show JSON schema
{
   "title": "V1Target",
   "type": "object",
   "properties": {
      "window_type": {
         "title": "Window Type",
         "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
         "type": "string"
      },
      "process_date": {
         "title": "Process Date",
         "description": "The process date.",
         "type": "string"
      },
      "offset_type": {
         "title": "Offset Type",
         "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
         "type": "string"
      },
      "offset": {
         "title": "Offset",
         "description": "The offset amount.",
         "type": "integer"
      },
      "start_of_week": {
         "title": "Start Of Week",
         "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
         "type": "string"
      },
      "quarter_start": {
         "title": "Quarter Start",
         "description": "The date to start the quarter.",
         "type": "string"
      },
      "year_start": {
         "title": "Year Start",
         "description": "The date to start the year.",
         "type": "string"
      }
   },
   "required": [
      "window_type"
   ]
}

Fields:
field offset: int | None = None

The offset amount.

field offset_type: str | None = None

The policy`s offset type. Accepted values include: week, month, and quarter.

field process_date: str | None = None

The process date.

field quarter_start: str | None = None

The date to start the quarter.

field start_of_week: str | None = None

The start day of week. Supported values: monday, tuesday, wednesday, thursday, friday, saturday, sunday.

field window_type: str [Required]

The target window type. Accepted values include: day, week, month, quarter, and year.

field year_start: str | None = None

The date to start the year.

pydantic model V1WindowParameters

Bases: BaseModel

Show JSON schema
{
   "title": "V1WindowParameters",
   "type": "object",
   "properties": {
      "target": {
         "title": "Target",
         "description": "The target parameters.",
         "allOf": [
            {
               "$ref": "#/definitions/V1Target"
            }
         ]
      },
      "baseline": {
         "title": "Baseline",
         "description": "The baseline parameters.",
         "allOf": [
            {
               "$ref": "#/definitions/V1Baseline"
            }
         ]
      }
   },
   "required": [
      "target",
      "baseline"
   ],
   "definitions": {
      "V1Target": {
         "title": "V1Target",
         "type": "object",
         "properties": {
            "window_type": {
               "title": "Window Type",
               "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.",
               "type": "string"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_type"
         ]
      },
      "V1Baseline": {
         "title": "V1Baseline",
         "type": "object",
         "properties": {
            "window_method": {
               "title": "Window Method",
               "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .",
               "type": "string"
            },
            "window_type": {
               "title": "Window Type",
               "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.",
               "type": "string"
            },
            "last_amount": {
               "title": "Last Amount",
               "description": "The last amount of `prior` or `last` for the given window type.",
               "type": "integer"
            },
            "process_date": {
               "title": "Process Date",
               "description": "The process date.",
               "type": "string"
            },
            "offset_type": {
               "title": "Offset Type",
               "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.",
               "type": "string"
            },
            "offset": {
               "title": "Offset",
               "description": "The offset amount.",
               "type": "integer"
            },
            "start_of_week": {
               "title": "Start Of Week",
               "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.",
               "type": "string"
            },
            "quarter_start": {
               "title": "Quarter Start",
               "description": "The date to start the quarter.",
               "type": "string"
            },
            "year_start": {
               "title": "Year Start",
               "description": "The date to start the year.",
               "type": "string"
            }
         },
         "required": [
            "window_method",
            "window_type"
         ]
      }
   }
}

Fields:
field baseline: V1Baseline [Required]

The baseline parameters.

field target: V1Target [Required]

The target parameters.

vianops_client.models.modelstore.segments

pydantic model V1BetweenOperatorModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1BetweenOperatorModel",
   "type": "object",
   "properties": {
      "min": {
         "title": "Min",
         "description": "Minimum value of BETWEEN.",
         "type": "number"
      },
      "max": {
         "title": "Max",
         "description": "Maximum value of BETWEEN.",
         "type": "number"
      }
   }
}

Fields:
field max: float = None

Maximum value of BETWEEN.

field min: float = None

Minimum value of BETWEEN.

pydantic model V1DataPreviewModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1DataPreviewModel",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Segment data preview.",
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "count": {
         "title": "Count",
         "description": "Record count.",
         "type": "integer"
      },
      "table": {
         "title": "Table",
         "description": "Name of table from which query was ran against to retrieve data preview.",
         "type": "string"
      }
   },
   "required": [
      "items",
      "count",
      "table"
   ],
   "example": {
      "items": [
         {
            "feature_a": 1,
            "feature_b": "cat"
         }
      ],
      "count": 200000,
      "table": "1691623334145_dit"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘items’: [{‘feature_a’: 1, ‘feature_b’: ‘cat’}], ‘count’: 200000, ‘table’: ‘1691623334145_dit’}}

Fields:
field count: int [Required]

Record count.

field items: List[dict] [Required]

Segment data preview.

field table: str [Required]

Name of table from which query was ran against to retrieve data preview.

pydantic model V1DataPreviewRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1DataPreviewRequestModel",
   "type": "object",
   "properties": {
      "feature_type": {
         "title": "Feature Type",
         "description": "Does the featureset belong to Training or Inference",
         "default": "inference",
         "enum": [
            "inference",
            "training"
         ],
         "type": "string"
      },
      "inference_table_name": {
         "title": "Inference Table Name",
         "description": "Inference table name.",
         "type": "string"
      },
      "training_table_name": {
         "title": "Training Table Name",
         "description": "Featureset name. Required if the value of `feature_type` is `training`.",
         "type": "string"
      },
      "segment_filters": {
         "title": "Segment Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      },
      "start_date": {
         "title": "Start Date",
         "description": "Amount of records to display starting from this date. Defaults to yesterday's date.",
         "type": "string",
         "format": "date"
      },
      "end_date": {
         "title": "End Date",
         "description": "Amount of records to display up to this date. Defaults to yesterday's date.",
         "type": "string",
         "format": "date"
      },
      "feature_index": {
         "title": "Feature Index",
         "description": "Index for the corresponding featureset (inference mapping index or feature source index)",
         "type": "integer"
      },
      "limit": {
         "title": "Limit",
         "description": "Maximum amount of records to display. Default value: 1000",
         "default": 1000,
         "type": "integer"
      }
   },
   "example": {
      "segment_filters": [
         {
            "feature_name": "FEATURE NAME",
            "operator": "TOP",
            "value": 10
         }
      ],
      "start_date": "2023-03-20",
      "end_date": "2023-03-20",
      "inference_mapping_index": 1,
      "limit": 100,
      "count": false
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘segment_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘TOP’, ‘value’: 10}], ‘start_date’: ‘2023-03-20’, ‘end_date’: ‘2023-03-20’, ‘inference_mapping_index’: 1, ‘limit’: 100, ‘count’: False}}

Fields:
field end_date: date | None = None

Amount of records to display up to this date. Defaults to yesterday’s date.

field feature_index: int | None = None

Index for the corresponding featureset (inference mapping index or feature source index)

field feature_type: Literal['inference', 'training'] = 'inference'

Does the featureset belong to Training or Inference

field inference_table_name: str | None = None

Inference table name.

field limit: int | None = 1000

Maximum amount of records to display. Default value: 1000

field segment_filters: List[V1SegmentFilterModel] | None = None

List of segment filters, their conditions, and relationships.

field start_date: date | None = None

Amount of records to display starting from this date. Defaults to yesterday’s date.

field training_table_name: str | None = None

Featureset name. Required if the value of feature_type is training.

pydantic model V1SegmentBaseModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentBaseModel",
   "type": "object",
   "properties": {
      "model_uuid": {
         "title": "Model Uuid",
         "description": "Unique identifier for model.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the segment.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the segment.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      }
   },
   "required": [
      "model_uuid",
      "name",
      "filters"
   ],
   "example": {
      "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
      "name": "NAME",
      "description": "DESCRIPTION",
      "filters": [
         {
            "grouped_filters": null,
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": null
         }
      ]
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}]}}

Fields:
field description: str | None = None

Description of the segment.

field filters: List[V1SegmentFilterModel] [Required]

List of segment filters, their conditions, and relationships.

field model_uuid: str [Required]

Unique identifier for model.

field name: str [Required]

Name of the segment.

pydantic model V1SegmentBaseModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentBaseModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1SegmentBaseModel"
   },
   "example": [
      {
         "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
         "name": "NAME",
         "description": "DESCRIPTION",
         "filters": [
            {
               "grouped_filters": null,
               "feature_name": "FEATURE NAME",
               "operator": "=",
               "value": [
                  "VALUE 1",
                  "VALUE 2"
               ],
               "conjunction": null
            }
         ]
      }
   ],
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentBaseModel": {
         "title": "V1SegmentBaseModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters"
         ],
         "example": {
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: [{‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}]}]}

Fields:
  • __root__ (List[vianops_client.models.modelstore.segments.V1SegmentBaseModel])

pydantic model V1SegmentFilterCondition

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentFilterCondition",
   "type": "object",
   "properties": {
      "condition": {
         "title": "Condition",
         "description": "Condition generated from specified Segment Filter id, table, and connection specified.",
         "type": "string"
      }
   },
   "required": [
      "condition"
   ],
   "example": {
      "condition": "feature_name > 10"
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘condition’: ‘feature_name > 10’}}

Fields:
field condition: str [Required]

Condition generated from specified Segment Filter id, table, and connection specified.

pydantic model V1SegmentFilterModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentFilterModel",
   "type": "object",
   "properties": {
      "feature_name": {
         "title": "Feature Name",
         "description": "Name of feature field to do the operation on.",
         "type": "string"
      },
      "value": {
         "title": "Value",
         "description": "Values of operator doing the filter. Value types supported are based on operator.",
         "anyOf": [
            {
               "type": "array",
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "integer"
                     },
                     {
                        "type": "boolean"
                     },
                     {
                        "type": "number"
                     }
                  ]
               }
            },
            {
               "type": "string"
            },
            {
               "type": "integer"
            },
            {
               "type": "boolean"
            },
            {
               "type": "number"
            },
            {
               "$ref": "#/definitions/V1BetweenOperatorModel"
            },
            {
               "$ref": "#/definitions/V1TopBottomOperatorModel"
            }
         ]
      },
      "operator": {
         "title": "Operator",
         "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
         "type": "string"
      },
      "conjunction": {
         "title": "Conjunction",
         "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
         "type": "string"
      },
      "grouped_filters": {
         "title": "Grouped Filters",
         "description": "List of grouped filters. Use for creating a nested filter within a filter.",
         "type": "array",
         "items": {
            "type": "object"
         }
      }
   },
   "additionalProperties": false,
   "example": {
      "feature_name": "FEATURE NAME",
      "operator": "=",
      "value": [
         "VALUE 1",
         "VALUE 2"
      ],
      "conjunction": "AND",
      "grouped_filters": [
         {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND"
         }
      ]
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      }
   }
}

Config:
  • extra: Extra = forbid

  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: ‘AND’, ‘grouped_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: ‘AND’}]}}

Fields:
Validators:
field conjunction: str | None = None

Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: AND, OR, null. Default value is null.

field feature_name: str | None = None

Name of feature field to do the operation on.

field grouped_filters: List[dict] | None = None

List of grouped filters. Use for creating a nested filter within a filter.

Validated by:
field operator: str | None = None

Operation to perform on the feature field. This field is case-insensitive. Supported operators: =, >, <, <=, >=, BETWEEN, TOP, BOTTOM, DISTINCT

Validated by:
field value: List[str | int | bool | float] | str | int | bool | float | V1BetweenOperatorModel | V1TopBottomOperatorModel | None = None

Values of operator doing the filter. Value types supported are based on operator.

validator grouped_filters_validator  »  grouped_filters
validator operator_matrix  »  operator
pydantic model V1SegmentModel

Bases: V1SegmentBaseModel

Show JSON schema
{
   "title": "V1SegmentModel",
   "type": "object",
   "properties": {
      "model_uuid": {
         "title": "Model Uuid",
         "description": "Unique identifier for model.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the segment.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the segment.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      },
      "id": {
         "title": "Id",
         "description": "Unique identifier generated by the platform for the segment.",
         "type": "integer"
      },
      "status": {
         "title": "Status",
         "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "created_by": {
         "title": "Created By",
         "description": "User who created the segment.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User who last modified the segment.",
         "type": "string"
      }
   },
   "required": [
      "model_uuid",
      "name",
      "filters",
      "id",
      "status",
      "created_ts",
      "modified_ts",
      "created_by",
      "modified_by"
   ],
   "example": {
      "id": 1,
      "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
      "name": "NAME",
      "description": "DESCRIPTION",
      "filters": [
         {
            "grouped_filters": null,
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": null
         }
      ],
      "status": "inactive",
      "created_ts": 1672531200000,
      "modified_ts": 1672531200000,
      "created_by": "user1",
      "modified_by": "user2"
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}

Fields:
field created_by: str [Required]

User who created the segment.

field created_ts: float | datetime [Required]

Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.

field id: int [Required]

Unique identifier generated by the platform for the segment.

field modified_by: str [Required]

User who last modified the segment.

field modified_ts: float | datetime [Required]

Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.

field status: str [Required]

Current status of the segment. This field is case-insensitive. Possible values: active, inactive (default), archived, delete.

pydantic model V1SegmentModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1SegmentWithPoliciesModel"
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SimplePolicyModel": {
         "title": "V1SimplePolicyModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier for policy.",
               "type": "string"
            },
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment for this policy.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model for this policy.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Name of the model version for this policy.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Name of the model stage for this policy.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.",
               "type": "string"
            }
         },
         "required": [
            "model_name",
            "name"
         ],
         "example": {
            "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "deployment": "deployment name",
            "model_name": "model name",
            "model_version": "1",
            "model_stage": "primary",
            "name": "name"
         }
      },
      "V1SegmentWithPoliciesModel": {
         "title": "V1SegmentWithPoliciesModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            },
            "policies": {
               "title": "Policies",
               "description": "List of policies using this segment. An empty list means no policies use this segment; if `null`, the search did not ask for the policies to be included.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SimplePolicyModel"
               }
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "policies": [
               {
                  "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
                  "deployment": "deployment name",
                  "model_name": "model name",
                  "model_version": "1",
                  "model_stage": "primary",
                  "name": "name"
               }
            ],
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.segments.V1SegmentWithPoliciesModel])

pydantic model V1SegmentModelPage

Bases: V1PageModel

Show JSON schema
{
   "title": "V1SegmentModelPage",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Segments returned by search in page.",
         "default": [],
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "example": {
      "items": [
         {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      ],
      "current_page": 1,
      "page_size": 100,
      "previous_page": null,
      "next_page": null,
      "has_previous": false,
      "previous_items": 0,
      "has_next": false,
      "total": 1,
      "pages": 1
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentModel": {
         "title": "V1SegmentModel",
         "type": "object",
         "properties": {
            "model_uuid": {
               "title": "Model Uuid",
               "description": "Unique identifier for model.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            },
            "id": {
               "title": "Id",
               "description": "Unique identifier generated by the platform for the segment.",
               "type": "integer"
            },
            "status": {
               "title": "Status",
               "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
               "type": "string"
            },
            "created_ts": {
               "title": "Created Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "created_by": {
               "title": "Created By",
               "description": "User who created the segment.",
               "type": "string"
            },
            "modified_by": {
               "title": "Modified By",
               "description": "User who last modified the segment.",
               "type": "string"
            }
         },
         "required": [
            "model_uuid",
            "name",
            "filters",
            "id",
            "status",
            "created_ts",
            "modified_ts",
            "created_by",
            "modified_by"
         ],
         "example": {
            "id": 1,
            "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "grouped_filters": null,
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": null
               }
            ],
            "status": "inactive",
            "created_ts": 1672531200000,
            "modified_ts": 1672531200000,
            "created_by": "user1",
            "modified_by": "user2"
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘items’: [{‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}

Fields:
field items: List[V1SegmentModel] = []

Segments returned by search in page.

pydantic model V1SegmentPageSearch

Bases: V1PageSearch, V1SegmentSearch

Show JSON schema
{
   "title": "V1SegmentPageSearch",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "ids": {
         "title": "Ids",
         "description": "List of segment ids.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "model_uuids": {
         "title": "Model Uuids",
         "description": "List of specific model uuids.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of segment names.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "segment_filters": {
         "title": "Segment Filters",
         "description": "List of segment filters to search for.",
         "type": "array",
         "items": {
            "type": "array",
            "items": {
               "type": "object"
            }
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "include_policies": {
         "title": "Include Policies",
         "description": "Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.",
         "default": false,
         "type": "boolean"
      },
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "allOf": [
            {
               "$ref": "#/definitions/V1SegmentSearchFilter"
            }
         ]
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 25,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "search": "SEARCH",
      "filters": {
         "ids": [
            1,
            2,
            3
         ],
         "names": [
            "NAME"
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1SegmentSearchFilter": {
         "title": "V1SegmentSearchFilter",
         "type": "object",
         "properties": {
            "created_bys": {
               "title": "Created Bys",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_bys": {
               "title": "Modified Bys",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "ids": {
               "title": "Ids",
               "description": "List of segment ids.",
               "type": "array",
               "items": {
                  "type": "integer"
               }
            },
            "model_uuids": {
               "title": "Model Uuids",
               "description": "List of specific model uuids.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "names": {
               "title": "Names",
               "description": "List of segment names.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "segment_filters": {
               "title": "Segment Filters",
               "description": "List of segment filters to search for.",
               "type": "array",
               "items": {
                  "type": "array",
                  "items": {
                     "type": "object"
                  }
               }
            },
            "statuses": {
               "title": "Statuses",
               "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            }
         }
      }
   }
}

Config:
  • fields: dict = {‘search_filters’: ‘filters’}

  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 25, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘search’: ‘SEARCH’, ‘filters’: {‘ids’: [1, 2, 3], ‘names’: [‘NAME’]}}}

Fields:
field search_filters: V1SegmentSearchFilter | None = None (alias 'filters')

Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.

pydantic model V1SegmentPreviewModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentPreviewModel",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Segment data preview.",
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "count": {
         "title": "Count",
         "description": "Record count.",
         "type": "integer"
      }
   },
   "required": [
      "items"
   ],
   "example": {
      "items": [
         {
            "feature_a": 1,
            "feature_b": "cat"
         }
      ],
      "count": 200000
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘items’: [{‘feature_a’: 1, ‘feature_b’: ‘cat’}], ‘count’: 200000}}

Fields:
field count: int | None = None

Record count.

field items: List[dict] [Required]

Segment data preview.

pydantic model V1SegmentPreviewRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentPreviewRequestModel",
   "type": "object",
   "properties": {
      "segment_filters": {
         "title": "Segment Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      },
      "start_date": {
         "title": "Start Date",
         "description": "Amount of records to display starting from this date. Defaults to yesterday's date.",
         "type": "string",
         "format": "date"
      },
      "end_date": {
         "title": "End Date",
         "description": "Amount of records to display up to this date. Defaults to yesterday's date.",
         "type": "string",
         "format": "date"
      },
      "inference_mapping_index": {
         "title": "Inference Mapping Index",
         "description": "Inference mapping index.",
         "type": "integer"
      },
      "limit": {
         "title": "Limit",
         "description": "Maximum amount of records to display. Default value: 1000",
         "default": 1000,
         "type": "integer"
      }
   },
   "required": [
      "segment_filters"
   ],
   "example": {
      "segment_filters": [
         {
            "feature_name": "FEATURE NAME",
            "operator": "TOP",
            "value": 10
         }
      ],
      "start_date": "2023-03-20",
      "end_date": "2023-03-20",
      "inference_mapping_index": 1,
      "limit": 100,
      "count": false
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘segment_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘TOP’, ‘value’: 10}], ‘start_date’: ‘2023-03-20’, ‘end_date’: ‘2023-03-20’, ‘inference_mapping_index’: 1, ‘limit’: 100, ‘count’: False}}

Fields:
field end_date: date | None = None

Amount of records to display up to this date. Defaults to yesterday’s date.

field inference_mapping_index: int = None

Inference mapping index.

field limit: int = 1000

Maximum amount of records to display. Default value: 1000

field segment_filters: List[V1SegmentFilterModel] [Required]

List of segment filters, their conditions, and relationships.

field start_date: date | None = None

Amount of records to display starting from this date. Defaults to yesterday’s date.

pydantic model V1SegmentSearch

Bases: V1SegmentSearchFilter

Show JSON schema
{
   "title": "V1SegmentSearch",
   "type": "object",
   "properties": {
      "created_bys": {
         "title": "Created Bys",
         "description": "List of 'created by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "modified_bys": {
         "title": "Modified Bys",
         "description": "List of 'modified by' users to search for.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "created_ts_start": {
         "title": "Created Ts Start",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "created_ts_end": {
         "title": "Created Ts End",
         "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
         "type": "number"
      },
      "modified_ts_start": {
         "title": "Modified Ts Start",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "modified_ts_end": {
         "title": "Modified Ts End",
         "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
         "type": "number"
      },
      "ids": {
         "title": "Ids",
         "description": "List of segment ids.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "model_uuids": {
         "title": "Model Uuids",
         "description": "List of specific model uuids.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "names": {
         "title": "Names",
         "description": "List of segment names.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "segment_filters": {
         "title": "Segment Filters",
         "description": "List of segment filters to search for.",
         "type": "array",
         "items": {
            "type": "array",
            "items": {
               "type": "object"
            }
         }
      },
      "statuses": {
         "title": "Statuses",
         "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "include_policies": {
         "title": "Include Policies",
         "description": "Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.",
         "default": false,
         "type": "boolean"
      }
   },
   "example": {
      "filters": {
         "ids": [
            1,
            2,
            3
         ],
         "names": [
            "NAME"
         ]
      },
      "include_policies": true
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘filters’: {‘ids’: [1, 2, 3], ‘names’: [‘NAME’]}, ‘include_policies’: True}}

Fields:
field include_policies: bool | None = False

Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.

pydantic model V1SegmentUpdateRequestModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentUpdateRequestModel",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "description": "Identifier for segment.",
         "type": "integer"
      },
      "name": {
         "title": "Name",
         "description": "Name of the segment set by the user.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the segment set by user. This is a NULLABLE field.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      }
   },
   "example": {
      "id": 1,
      "name": "NAME",
      "description": "DESCRIPTION",
      "filters": [
         {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ]
         }
      ]
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘id’: 1, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’]}]}}

Fields:
field description: str | None = None

Description of the segment set by user. This is a NULLABLE field.

field filters: List[V1SegmentFilterModel] | None = None

List of segment filters, their conditions, and relationships.

field id: int = None

Identifier for segment.

field name: str | None = None

Name of the segment set by the user.

pydantic model V1SegmentUpdateRequestModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1SegmentUpdateRequestModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1SegmentUpdateRequestModel"
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SegmentUpdateRequestModel": {
         "title": "V1SegmentUpdateRequestModel",
         "type": "object",
         "properties": {
            "id": {
               "title": "Id",
               "description": "Identifier for segment.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of the segment set by the user.",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the segment set by user. This is a NULLABLE field.",
               "type": "string"
            },
            "filters": {
               "title": "Filters",
               "description": "List of segment filters, their conditions, and relationships.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1SegmentFilterModel"
               }
            }
         },
         "example": {
            "id": 1,
            "name": "NAME",
            "description": "DESCRIPTION",
            "filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ]
               }
            ]
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.modelstore.segments.V1SegmentUpdateRequestModel])

pydantic model V1SegmentWithPoliciesModel

Bases: V1SegmentModel

Show JSON schema
{
   "title": "V1SegmentWithPoliciesModel",
   "type": "object",
   "properties": {
      "model_uuid": {
         "title": "Model Uuid",
         "description": "Unique identifier for model.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the segment.",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the segment.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "List of segment filters, their conditions, and relationships.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SegmentFilterModel"
         }
      },
      "id": {
         "title": "Id",
         "description": "Unique identifier generated by the platform for the segment.",
         "type": "integer"
      },
      "status": {
         "title": "Status",
         "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.",
         "type": "string"
      },
      "created_ts": {
         "title": "Created Ts",
         "description": "Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "created_by": {
         "title": "Created By",
         "description": "User who created the segment.",
         "type": "string"
      },
      "modified_by": {
         "title": "Modified By",
         "description": "User who last modified the segment.",
         "type": "string"
      },
      "policies": {
         "title": "Policies",
         "description": "List of policies using this segment. An empty list means no policies use this segment; if `null`, the search did not ask for the policies to be included.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1SimplePolicyModel"
         }
      }
   },
   "required": [
      "model_uuid",
      "name",
      "filters",
      "id",
      "status",
      "created_ts",
      "modified_ts",
      "created_by",
      "modified_by"
   ],
   "example": {
      "id": 1,
      "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
      "name": "NAME",
      "description": "DESCRIPTION",
      "filters": [
         {
            "grouped_filters": null,
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": null
         }
      ],
      "status": "inactive",
      "policies": [
         {
            "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "deployment": "deployment name",
            "model_name": "model name",
            "model_version": "1",
            "model_stage": "primary",
            "name": "name"
         }
      ],
      "created_ts": 1672531200000,
      "modified_ts": 1672531200000,
      "created_by": "user1",
      "modified_by": "user2"
   },
   "definitions": {
      "V1BetweenOperatorModel": {
         "title": "V1BetweenOperatorModel",
         "type": "object",
         "properties": {
            "min": {
               "title": "Min",
               "description": "Minimum value of BETWEEN.",
               "type": "number"
            },
            "max": {
               "title": "Max",
               "description": "Maximum value of BETWEEN.",
               "type": "number"
            }
         }
      },
      "V1TopBottomOperatorModel": {
         "title": "V1TopBottomOperatorModel",
         "type": "object",
         "properties": {
            "direction": {
               "title": "Direction",
               "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
               "default": "DESC",
               "type": "string"
            },
            "method": {
               "title": "Method",
               "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
               "default": "flat",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Percent or flat number of rows to take.",
               "type": "number"
            }
         }
      },
      "V1SegmentFilterModel": {
         "title": "V1SegmentFilterModel",
         "type": "object",
         "properties": {
            "feature_name": {
               "title": "Feature Name",
               "description": "Name of feature field to do the operation on.",
               "type": "string"
            },
            "value": {
               "title": "Value",
               "description": "Values of operator doing the filter. Value types supported are based on operator.",
               "anyOf": [
                  {
                     "type": "array",
                     "items": {
                        "anyOf": [
                           {
                              "type": "string"
                           },
                           {
                              "type": "integer"
                           },
                           {
                              "type": "boolean"
                           },
                           {
                              "type": "number"
                           }
                        ]
                     }
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number"
                  },
                  {
                     "$ref": "#/definitions/V1BetweenOperatorModel"
                  },
                  {
                     "$ref": "#/definitions/V1TopBottomOperatorModel"
                  }
               ]
            },
            "operator": {
               "title": "Operator",
               "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`",
               "type": "string"
            },
            "conjunction": {
               "title": "Conjunction",
               "description": "Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: `AND`, `OR`, `null`. Default value is `null`.",
               "type": "string"
            },
            "grouped_filters": {
               "title": "Grouped Filters",
               "description": "List of grouped filters. Use for creating a nested filter within a filter.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "additionalProperties": false,
         "example": {
            "feature_name": "FEATURE NAME",
            "operator": "=",
            "value": [
               "VALUE 1",
               "VALUE 2"
            ],
            "conjunction": "AND",
            "grouped_filters": [
               {
                  "feature_name": "FEATURE NAME",
                  "operator": "=",
                  "value": [
                     "VALUE 1",
                     "VALUE 2"
                  ],
                  "conjunction": "AND"
               }
            ]
         }
      },
      "V1SimplePolicyModel": {
         "title": "V1SimplePolicyModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Unique identifier for policy.",
               "type": "string"
            },
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment for this policy.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model for this policy.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Name of the model version for this policy.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Name of the model stage for this policy.",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.",
               "type": "string"
            }
         },
         "required": [
            "model_name",
            "name"
         ],
         "example": {
            "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
            "deployment": "deployment name",
            "model_name": "model name",
            "model_version": "1",
            "model_stage": "primary",
            "name": "name"
         }
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘policies’: [{‘uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘deployment’: ‘deployment name’, ‘model_name’: ‘model name’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘name’}], ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}

Fields:
field policies: List[V1SimplePolicyModel] | None = None

List of policies using this segment. An empty list means no policies use this segment; if null, the search did not ask for the policies to be included.

pydantic model V1SimplePolicyModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1SimplePolicyModel",
   "type": "object",
   "properties": {
      "uuid": {
         "title": "Uuid",
         "description": "Unique identifier for policy.",
         "type": "string"
      },
      "deployment": {
         "title": "Deployment",
         "description": "Name of the deployment for this policy.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Name of the model for this policy.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Name of the model version for this policy.",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Name of the model stage for this policy.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.",
         "type": "string"
      }
   },
   "required": [
      "model_name",
      "name"
   ],
   "example": {
      "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab",
      "deployment": "deployment name",
      "model_name": "model name",
      "model_version": "1",
      "model_stage": "primary",
      "name": "name"
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘deployment’: ‘deployment name’, ‘model_name’: ‘model name’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘name’}}

Fields:
field deployment: str | None = None

Name of the deployment for this policy.

field model_name: str [Required]

Name of the model for this policy.

field model_stage: str | None = None

Name of the model stage for this policy.

field model_version: str | None = None

Name of the model version for this policy.

field name: str [Required]

Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.

field uuid: str | None = None

Unique identifier for policy.

pydantic model V1TopBottomOperatorModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1TopBottomOperatorModel",
   "type": "object",
   "properties": {
      "direction": {
         "title": "Direction",
         "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.",
         "default": "DESC",
         "type": "string"
      },
      "method": {
         "title": "Method",
         "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.",
         "default": "flat",
         "type": "string"
      },
      "value": {
         "title": "Value",
         "description": "Percent or flat number of rows to take.",
         "type": "number"
      }
   }
}

Fields:
field direction: str = 'DESC'

Direction of field values. This field is case-insensitive. Supported directions: ASC (ascending), DESC (descending). Default is DESC.

field method: str = 'flat'

Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: percent, flat. Default is flat.

field value: float = None

Percent or flat number of rows to take.