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" ] }
- 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.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" } } }
- 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<