Model store objects
Objects and models for models, model tags, policies, segments, and model alerts. This data is maintained in the hila Enterprise 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": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" } }, "example": { "assigned": "user1", "data": { "key1": "value1" }, "policy_uuid": "123-abc-456", "segment_id": null, "severity": 3, "status": "Open", "table_id": "1234", "trigger_metric": "metric1", "trigger_value": 0.25, "type": "drift" }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data" ] }
- Config:
from_attributes: bool = True
json_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:
RootModel
Show JSON schema
{ "title": "V1AlertCreateModelList", "type": "array", "$defs": { "V1AlertBaseModel": { "example": { "assigned": "user1", "data": { "key1": "value1" }, "policy_uuid": "123-abc-456", "segment_id": null, "severity": 3, "status": "Open", "table_id": "1234", "trigger_metric": "metric1", "trigger_value": 0.25, "type": "drift" }, "properties": { "policy_uuid": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" } }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data" ], "title": "V1AlertBaseModel", "type": "object" } }, "items": { "$ref": "#/$defs/V1AlertBaseModel" } }
- field root: List[V1AlertBaseModel] [Required]
- pydantic model V1AlertModel
Bases:
V1AlertBaseModel
Show JSON schema
{ "title": "V1AlertModel", "type": "object", "properties": { "policy_uuid": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" }, "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "created_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was created.", "title": "Created Ts", "type": "number" }, "modified_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.", "title": "Modified Ts", "type": "number" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username for the user who created the alert. This should be added only on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Modified By" } }, "example": { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data", "uuid", "created_ts", "modified_ts" ] }
- Config:
from_attributes: bool = True
json_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": { "items": { "$ref": "#/$defs/V1AlertModel" }, "title": "Items", "type": "array" } }, "$defs": { "V1AlertModel": { "example": { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" }, "properties": { "policy_uuid": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" }, "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "created_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was created.", "title": "Created Ts", "type": "number" }, "modified_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.", "title": "Modified Ts", "type": "number" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username for the user who created the alert. This should be added only on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Modified By" } }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data", "uuid", "created_ts", "modified_ts" ], "title": "V1AlertModel", "type": "object" } }, "example": [ { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" } ], "required": [ "items" ] }
- Config:
from_attributes: bool = True
json_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": { "items": { "$ref": "#/$defs/V1AlertModel" }, "title": "Items", "type": "array" }, "current_page": { "default": 0, "description": "Current page of items.", "title": "Current Page", "type": "integer" }, "page_size": { "default": 0, "description": "Number of items on a page.", "title": "Page Size", "type": "integer" }, "previous_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the previous page.", "title": "Previous Page" }, "next_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the next page.", "title": "Next Page" }, "has_previous": { "default": false, "description": "Whether or not there is a previous page.", "title": "Has Previous", "type": "boolean" }, "previous_items": { "default": 0, "title": "Previous Items", "type": "integer" }, "has_next": { "default": false, "description": "Whether or not there is a next page.", "title": "Has Next", "type": "boolean" }, "total": { "default": 0, "description": "Total number of items returned by search over all pages.", "title": "Total", "type": "integer" }, "pages": { "default": 0, "description": "Total number of pages returned by search.", "title": "Pages", "type": "integer" } }, "$defs": { "V1AlertModel": { "example": { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" }, "properties": { "policy_uuid": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" }, "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "created_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was created.", "title": "Created Ts", "type": "number" }, "modified_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.", "title": "Modified Ts", "type": "number" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username for the user who created the alert. This should be added only on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Modified By" } }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data", "uuid", "created_ts", "modified_ts" ], "title": "V1AlertModel", "type": "object" } }, "example": { "current_page": 1, "has_next": false, "has_previous": false, "items": [ { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" } ], "next_page": null, "page_size": 100, "pages": 1, "previous_items": 0, "previous_page": null, "total": 1 }, "required": [ "items" ] }
- Config:
json_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": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert uuids for the alerts to search for.", "title": "Uuids" }, "policy_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policy IDs for the alerts to search for.", "title": "Policy Uuids" }, "segment_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment IDs for the alerts to search for.", "title": "Segment Ids" }, "table_id": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of table IDs for the alerts to search for.", "title": "Table Id" }, "severity": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert severities for the alerts to search for.", "title": "Severity" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert types for the alerts to search for.", "title": "Type" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert statuses for the alerts to search for.", "title": "Statuses" }, "trigger_metrices": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metrices" }, "assignee": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert assignees for the alerts to search for.", "title": "Assignee" }, "trigger_value_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.", "title": "Trigger Value Start" }, "trigger_value_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.", "title": "Trigger Value End" } } }
- Config:
populate_by_name: bool = True
alias_generator: function = <function V1AlertSearchModel.<lambda> at 0x7f98f4f32ca0>
- 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
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
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
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": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert uuids for the alerts to search for.", "title": "Uuids" }, "policy_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policy IDs for the alerts to search for.", "title": "Policy Uuids" }, "segment_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment IDs for the alerts to search for.", "title": "Segment Ids" }, "table_id": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of table IDs for the alerts to search for.", "title": "Table Id" }, "severity": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert severities for the alerts to search for.", "title": "Severity" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert types for the alerts to search for.", "title": "Type" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert statuses for the alerts to search for.", "title": "Statuses" }, "trigger_metrices": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metrices" }, "assignee": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert assignees for the alerts to search for.", "title": "Assignee" }, "trigger_value_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.", "title": "Trigger Value Start" }, "trigger_value_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.", "title": "Trigger Value End" }, "page": { "default": 1, "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`).", "title": "Page", "type": "integer" }, "page_size": { "default": 25, "description": "Number of items to return on a page. Default is 25 items per page.", "title": "Page Size", "type": "integer" }, "order": { "anyOf": [ { "items": { "$ref": "#/$defs/V1OrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Fields to use for ordering returned pages and the sort direction.", "title": "Order" }, "search": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String to search for (case-insensitive) across all fields in previously created items.", "title": "Search" }, "filters": { "anyOf": [ { "$ref": "#/$defs/V1AlertSearchModel" }, { "type": "null" } ], "default": null, "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved." } }, "$defs": { "V1AlertSearchModel": { "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert uuids for the alerts to search for.", "title": "Uuids" }, "policy_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policy IDs for the alerts to search for.", "title": "Policy Uuids" }, "segment_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment IDs for the alerts to search for.", "title": "Segment Ids" }, "table_id": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of table IDs for the alerts to search for.", "title": "Table Id" }, "severity": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert severities for the alerts to search for.", "title": "Severity" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert types for the alerts to search for.", "title": "Type" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert statuses for the alerts to search for.", "title": "Statuses" }, "trigger_metrices": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of trigger metrics for the alerts to search for. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metrices" }, "assignee": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of alert assignees for the alerts to search for.", "title": "Assignee" }, "trigger_value_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Start of trigger value to filter for. All alerts with `trigger_value` greater than or equal to this value will be returned.", "title": "Trigger Value Start" }, "trigger_value_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "End of trigger value to filter for. All alerts with `trigger_value` less than or equal to this value will be returned.", "title": "Trigger Value End" } }, "title": "V1AlertSearchModel", "type": "object" }, "V1OrderBy": { "properties": { "field": { "description": "Field to order by.", "title": "Field", "type": "string" }, "direction": { "default": "ASC", "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).", "enum": [ "ASC", "DESC" ], "title": "Direction", "type": "string" } }, "required": [ "field" ], "title": "V1OrderBy", "type": "object" } }, "example": { "filters": { "severities": [ 3, 5 ], "uuids": [ "123-abc-456", "123-xyz-789" ] }, "order": [ { "direction": "DESC", "field": "name" } ], "page": 1, "page_size": 100 } }
- Config:
populate_by_name: bool = True
alias_generator: function = <function V1AlertSearchModel.<lambda> at 0x7f98f4f32ca0>
json_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": { "description": "Unique identifier generated by the platform for the alert.", "title": "Uuid", "type": "string" }, "error": { "description": "Error message", "title": "Error", "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:
RootModel
Show JSON schema
{ "title": "V1AlertUpdateModelList", "type": "array", "$defs": { "V1AlertUpdateRequestModel": { "properties": { "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Field to represent the status of an alert. Possible values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" } }, "required": [ "uuid" ], "title": "V1AlertUpdateRequestModel", "type": "object" } }, "items": { "$ref": "#/$defs/V1AlertUpdateRequestModel" } }
- field root: List[V1AlertUpdateRequestModel] [Required]
- pydantic model V1AlertUpdateRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1AlertUpdateRequestModel", "type": "object", "properties": { "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Field to represent the status of an alert. Possible values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" } }, "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": { "items": { "$ref": "#/$defs/V1AlertModel" }, "title": "Succes", "type": "array" }, "failed": { "items": { "$ref": "#/$defs/V1AlertUpdateFailedModel" }, "title": "Failed", "type": "array" } }, "$defs": { "V1AlertModel": { "example": { "assigned": "user3", "created_by": "user1", "created_ts": 1672531200000, "data": {}, "modified_by": "user2", "modified_ts": 1672531200000, "policy_uuid": "123-abc-456", "segment_id": 1, "severity": 5, "status": "Open", "table_id": "12324", "trigger_metric": "PSI", "trigger_value": 0.25, "type": "drift", "uuid": "123-abc-456" }, "properties": { "policy_uuid": { "description": "Unique ID of a policy related to the alert.", "title": "Policy Uuid", "type": "string" }, "segment_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Unique ID of a segment related to the alert.", "title": "Segment Id" }, "table_id": { "description": "Foreign key reference to drift or model performance row. Table determined by type of alert.", "title": "Table Id", "type": "string" }, "severity": { "default": 1, "description": "Severity of the alert. Higher number is a more severe alert. Defaults to 1 if not provided.", "title": "Severity", "type": "integer" }, "type": { "description": "Type of alert. This field is case-insensitive. Supported values: `drift`, `performance`.", "title": "Type", "type": "string" }, "status": { "description": "Represents the status of the alert. Example values: `Open`, `Fix in progress`, `Resolved`, `Ignored`.", "title": "Status", "type": "string" }, "trigger_metric": { "description": "Metric for which this alert triggers. See the User Guide 'Metrics' page for guidance.", "title": "Trigger Metric", "type": "string" }, "trigger_value": { "description": "Value of the metric for which this alert triggers.", "title": "Trigger Value", "type": "number" }, "data": { "description": "JSON body for the alert.", "title": "Data", "type": "object" }, "assigned": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User who is assigned to the alert.", "title": "Assigned" }, "uuid": { "description": "Unique identifier generated by platform for the alert.", "title": "Uuid", "type": "string" }, "created_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was created.", "title": "Created Ts", "type": "number" }, "modified_ts": { "description": "Timestamp (Unix time in milliseconds) when the alert was last modified.", "title": "Modified Ts", "type": "number" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username for the user who created the alert. This should be added only on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Modified By" } }, "required": [ "policy_uuid", "table_id", "type", "status", "trigger_metric", "trigger_value", "data", "uuid", "created_ts", "modified_ts" ], "title": "V1AlertModel", "type": "object" }, "V1AlertUpdateFailedModel": { "properties": { "uuid": { "description": "Unique identifier generated by the platform for the alert.", "title": "Uuid", "type": "string" }, "error": { "description": "Error message", "title": "Error", "type": "string" } }, "required": [ "uuid", "error" ], "title": "V1AlertUpdateFailedModel", "type": "object" } }, "required": [ "succes", "failed" ] }
- 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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version", "title": "Version" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model status", "title": "Status" }, "stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage", "title": "Stage" }, "project_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project uuid associated with the model.", "title": "Project Uuid" }, "created_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model.", "title": "Modified By" } }, "example": { "created_by": "user1", "created_ts": 1675292368, "modified_by": "user1", "modified_ts": 1675292368, "project_uuid": "0", "stage": "Example model stage", "status": "active", "version": "1.0" } }
- Config:
from_attributes: bool = True
json_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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Status of explainer job", "title": "Job Status" }, "explainer_job_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "job id of the explainer job", "title": "Explainer Job Id" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "messege response for explain session", "title": "Message" } } }
- 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": { "default": 1, "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`).", "title": "Page", "type": "integer" }, "page_size": { "default": 25, "description": "Number of items to return on a page. Default is 25 items per page.", "title": "Page Size", "type": "integer" }, "order": { "anyOf": [ { "items": { "$ref": "#/$defs/V1OrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Fields to use for ordering returned pages and the sort direction.", "title": "Order" }, "search": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String to search for (case-insensitive) across all fields in previously created items.", "title": "Search" }, "filters": { "anyOf": [ { "$ref": "#/$defs/V1ModelsFilters" }, { "type": "null" } ], "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved." }, "include_tags": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "If `true` returns defined models tags with search results; otherwise, `false` (default value).", "title": "Include Tags" } }, "$defs": { "V1ModelsFilters": { "example": { "names": [ "Example model 1" ], "uuids": [ "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "9140dd05-3f7a-49a4-b625-379880bd9606" ] }, "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Names" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "versions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions for this operation.", "title": "Versions" }, "stages": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Stages" }, "project_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Project Uuids" } }, "title": "V1ModelsFilters", "type": "object" }, "V1OrderBy": { "properties": { "field": { "description": "Field to order by.", "title": "Field", "type": "string" }, "direction": { "default": "ASC", "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).", "enum": [ "ASC", "DESC" ], "title": "Direction", "type": "string" } }, "required": [ "field" ], "title": "V1OrderBy", "type": "object" } }, "example": { "filters": { "names": [ "Example model 1" ], "uuids": [ "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "9140dd05-3f7a-49a4-b625-379880bd9606" ] }, "order": [ { "direction": "DESC", "field": "name" } ], "page": 1, "page_size": 100, "search": "vianai" } }
- Config:
json_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 [Optional]
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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version", "title": "Version" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model status", "title": "Status" }, "stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage", "title": "Stage" }, "project_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project uuid associated with the model.", "title": "Project Uuid" }, "created_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model.", "title": "Modified By" }, "filters": { "anyOf": [ { "$ref": "#/$defs/V1ModelsFilters" }, { "type": "null" } ], "default": null, "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved." } }, "$defs": { "V1ModelsFilters": { "example": { "names": [ "Example model 1" ], "uuids": [ "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "9140dd05-3f7a-49a4-b625-379880bd9606" ] }, "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Names" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "versions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions for this operation.", "title": "Versions" }, "stages": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Stages" }, "project_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Project Uuids" } }, "title": "V1ModelsFilters", "type": "object" } }, "example": { "filters": { "names": [ "Example model 1" ], "uuids": [ "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "9140dd05-3f7a-49a4-b625-379880bd9606" ] }, "stage": "New model stage", "version": "2.0" } }
- Config:
from_attributes: bool = True
json_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": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Names" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "versions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions for this operation.", "title": "Versions" }, "stages": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Stages" }, "project_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages for this operation.", "title": "Project Uuids" } }, "example": { "names": [ "Example model 1" ], "uuids": [ "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "9140dd05-3f7a-49a4-b625-379880bd9606" ] } }
- Config:
from_attributes: bool = True
populate_by_name: bool = True
alias_generator: function = <function V1ModelsFilters.<lambda> at 0x7f98f4f01620>
json_schema_extra: dict = {‘example’: {‘uuids’: [‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘9140dd05-3f7a-49a4-b625-379880bd9606’], ‘names’: [‘Example model 1’]}}
- Fields:
- field project_uuid: List[str] | None = None (alias 'project_uuids')
List of model stages for this operation.
- 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 V1ModelsLoadPrompt
Bases:
BaseModel
Show JSON schema
{ "title": "V1ModelsLoadPrompt", "type": "object", "properties": { "project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project name to load prompts", "title": "Project Name" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model name to load prompts", "title": "Model Name" } } }
- Config:
protected_namespaces: tuple = ()
- Fields:
- field model_name: str | None = None
Model name to load prompts
- field project_name: str | None = None
Project name to load prompts
- pydantic model V1ModelsLoadPromptResponse
Bases:
BaseModel
Show JSON schema
{ "title": "V1ModelsLoadPromptResponse", "type": "object", "properties": { "successful_files": { "description": "List of prompt files that were successfully loaded", "items": { "type": "string" }, "title": "Successful Files", "type": "array" }, "failed_files": { "description": "List of prompt files that failed during load", "items": { "type": "string" }, "title": "Failed Files", "type": "array" } }, "required": [ "successful_files", "failed_files" ] }
- field failed_files: List[str] [Required]
List of prompt files that failed during load
- field successful_files: List[str] [Required]
List of prompt files that were successfully loaded
- pydantic model V1ModelsModel
Bases:
V1BaseModelsModel
Show JSON schema
{ "title": "V1ModelsModel", "type": "object", "properties": { "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version", "title": "Version" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model status", "title": "Status" }, "stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage", "title": "Stage" }, "project_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project uuid associated with the model.", "title": "Project Uuid" }, "created_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model.", "title": "Modified By" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model.", "title": "Uuid" }, "name": { "description": "Name of the model", "title": "Name", "type": "string" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/V1ModelTagsModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Model tags associated with the model.", "title": "Tags" } }, "$defs": { "V1ModelTagsModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "model_uuid": "abc-123-def-456", "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model Tag", "status": "active", "uuid": "xyz-789-rst-456", "value": { "key": "value" } }, "properties": { "model_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model that the tag is associated with.", "title": "Model Uuid" }, "name": { "description": "Name of the model tag.", "title": "Name", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "string" }, { "items": {}, "type": "array" }, { "items": { "type": "object" }, "type": "array" }, { "type": "object" } ], "description": "Value of the model tag.", "title": "Value" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model tag.", "title": "Uuid" }, "status": { "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model", "title": "Modified By" } }, "required": [ "name", "value", "status" ], "title": "V1ModelTagsModel", "type": "object" } }, "example": { "created_by": "user1", "created_ts": 1675292368, "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model", "project_uuid": "0", "stage": "Example model stage", "status": "active", "uuid": "0", "version": "1.0" }, "required": [ "name" ] }
- Config:
from_attributes: bool = True
json_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:
RootModel
Show JSON schema
{ "title": "V1ModelsModelList", "type": "array", "$defs": { "V1ModelTagsModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "model_uuid": "abc-123-def-456", "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model Tag", "status": "active", "uuid": "xyz-789-rst-456", "value": { "key": "value" } }, "properties": { "model_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model that the tag is associated with.", "title": "Model Uuid" }, "name": { "description": "Name of the model tag.", "title": "Name", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "string" }, { "items": {}, "type": "array" }, { "items": { "type": "object" }, "type": "array" }, { "type": "object" } ], "description": "Value of the model tag.", "title": "Value" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model tag.", "title": "Uuid" }, "status": { "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model", "title": "Modified By" } }, "required": [ "name", "value", "status" ], "title": "V1ModelTagsModel", "type": "object" }, "V1ModelsModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model", "project_uuid": "0", "stage": "Example model stage", "status": "active", "uuid": "0", "version": "1.0" }, "properties": { "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version", "title": "Version" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model status", "title": "Status" }, "stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage", "title": "Stage" }, "project_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project uuid associated with the model.", "title": "Project Uuid" }, "created_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model.", "title": "Modified By" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model.", "title": "Uuid" }, "name": { "description": "Name of the model", "title": "Name", "type": "string" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/V1ModelTagsModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Model tags associated with the model.", "title": "Tags" } }, "required": [ "name" ], "title": "V1ModelsModel", "type": "object" } }, "items": { "$ref": "#/$defs/V1ModelsModel" } }
- field root: List[V1ModelsModel] [Required]
- pydantic model V1ModelsModelPage
Bases:
V1PageModel
Show JSON schema
{ "title": "V1ModelsModelPage", "type": "object", "properties": { "items": { "default": [], "description": "Models returned by search in page.", "items": { "$ref": "#/$defs/V1ModelsModel" }, "title": "Items", "type": "array" }, "current_page": { "default": 0, "description": "Current page of items.", "title": "Current Page", "type": "integer" }, "page_size": { "default": 0, "description": "Number of items on a page.", "title": "Page Size", "type": "integer" }, "previous_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the previous page.", "title": "Previous Page" }, "next_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the next page.", "title": "Next Page" }, "has_previous": { "default": false, "description": "Whether or not there is a previous page.", "title": "Has Previous", "type": "boolean" }, "previous_items": { "default": 0, "title": "Previous Items", "type": "integer" }, "has_next": { "default": false, "description": "Whether or not there is a next page.", "title": "Has Next", "type": "boolean" }, "total": { "default": 0, "description": "Total number of items returned by search over all pages.", "title": "Total", "type": "integer" }, "pages": { "default": 0, "description": "Total number of pages returned by search.", "title": "Pages", "type": "integer" } }, "$defs": { "V1ModelTagsModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "model_uuid": "abc-123-def-456", "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model Tag", "status": "active", "uuid": "xyz-789-rst-456", "value": { "key": "value" } }, "properties": { "model_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model that the tag is associated with.", "title": "Model Uuid" }, "name": { "description": "Name of the model tag.", "title": "Name", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "string" }, { "items": {}, "type": "array" }, { "items": { "type": "object" }, "type": "array" }, { "type": "object" } ], "description": "Value of the model tag.", "title": "Value" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model tag.", "title": "Uuid" }, "status": { "description": "Current status of the model tag. This field is case-insensitive. Possible values: `active`(default), `inactive` , `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model", "title": "Modified By" } }, "required": [ "name", "value", "status" ], "title": "V1ModelTagsModel", "type": "object" }, "V1ModelsModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "modified_by": "user1", "modified_ts": 1675292368, "name": "Example Model", "project_uuid": "0", "stage": "Example model stage", "status": "active", "uuid": "0", "version": "1.0" }, "properties": { "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version", "title": "Version" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model status", "title": "Status" }, "stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage", "title": "Stage" }, "project_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project uuid associated with the model.", "title": "Project Uuid" }, "created_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at creation time.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds generated at last modification time.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that created the model.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User that modified the model.", "title": "Modified By" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "UUID of the model.", "title": "Uuid" }, "name": { "description": "Name of the model", "title": "Name", "type": "string" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/V1ModelTagsModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Model tags associated with the model.", "title": "Tags" } }, "required": [ "name" ], "title": "V1ModelsModel", "type": "object" } }, "example": { "current_page": 1, "has_next": false, "has_previous": false, "items": [ { "created_by": "user1", "created_ts": 1675251260780.042, "modified_by": "user2", "modified_ts": null, "name": "Example Model 1", "stage": "0", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "version": "1.0" } ], "next_page": null, "page_size": 100, "pages": 1, "previous_items": 0, "previous_page": null, "total": 1 } }
- Config:
json_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.
- pydantic model V1ModelsSetup
Bases:
BaseModel
Show JSON schema
{ "title": "V1ModelsSetup", "type": "object", "properties": { "db_name": { "description": "Database name", "title": "Db Name", "type": "string" }, "project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Project name", "title": "Project Name" }, "models_dict": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Dictionary of models and attributes", "title": "Models Dict" }, "source_project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Source Project name", "title": "Source Project Name" } }, "required": [ "db_name" ] }
- Fields:
- field db_name: str [Required]
Database name
- field models_dict: dict | None = None
Dictionary of models and attributes
- field project_name: str | None = None
Project name
- field source_project_name: str | None = None
Source Project name
vianops_client.models.modelstore.policies
- pydantic model V1Baseline
Bases:
BaseModel
Show JSON schema
{ "title": "V1Baseline", "type": "object", "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "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": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ] }
- Config:
json_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": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ] }
- Config:
json_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": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the policy set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "inactive", "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `deleted`. Default value: `inactive`.", "title": "Status" }, "segments": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentModel" }, "type": "array" }, { "type": "null" } ], "default": null, "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.", "title": "Segments" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when the segment was created. Should not be changed after creation.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username that created the row. This should be only added on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Modified By" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "created_by": "user1", "created_ts": 1675292368, "deployment": "deployment_name", "description": "Description of policy", "model_name": "model_name", "model_stage": "string", "model_version": "1", "modified_by": "user2", "modified_ts": 1675292368, "name": "Example Policy Name", "policy": { "critical_level": 0.25, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25 }, "method": "preprocess", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" }, "required": [ "model_name", "name" ] }
- Config:
protected_namespaces: tuple = ()
json_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’}}
from_attributes: bool = True
- 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:
RootModel
Show JSON schema
{ "title": "V1PolicyModelList", "type": "array", "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1PolicyModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "deployment": "deployment_name", "description": "Description of policy", "model_name": "model_name", "model_stage": "string", "model_version": "1", "modified_by": "user2", "modified_ts": 1675292368, "name": "Example Policy Name", "policy": { "critical_level": 0.25, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25 }, "method": "preprocess", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" }, "properties": { "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the policy set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "inactive", "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `deleted`. Default value: `inactive`.", "title": "Status" }, "segments": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentModel" }, "type": "array" }, { "type": "null" } ], "default": null, "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.", "title": "Segments" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when the segment was created. Should not be changed after creation.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username that created the row. This should be only added on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Modified By" } }, "required": [ "model_name", "name" ], "title": "V1PolicyModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": [ { "created_by": "user1", "created_ts": 1675292368, "deployment": "deployment_name", "description": "Policy Description", "model_name": "model_name", "model_stage": "primary", "model_version": "1", "modified_by": "user2", "modified_ts": 1675292368, "name": "Example Policy Name", "policy": { "critical_level": 2, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25 }, "method": "preprocess", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" } ], "items": { "$ref": "#/$defs/V1PolicyModel" } }
- Config:
json_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:
- field root: List[V1PolicyModel] [Required]
- pydantic model V1PolicyModelPage
Bases:
V1PageModel
Show JSON schema
{ "title": "V1PolicyModelPage", "type": "object", "properties": { "items": { "items": { "$ref": "#/$defs/V1PolicyModel" }, "title": "Items", "type": "array" }, "current_page": { "default": 0, "description": "Current page of items.", "title": "Current Page", "type": "integer" }, "page_size": { "default": 0, "description": "Number of items on a page.", "title": "Page Size", "type": "integer" }, "previous_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the previous page.", "title": "Previous Page" }, "next_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the next page.", "title": "Next Page" }, "has_previous": { "default": false, "description": "Whether or not there is a previous page.", "title": "Has Previous", "type": "boolean" }, "previous_items": { "default": 0, "title": "Previous Items", "type": "integer" }, "has_next": { "default": false, "description": "Whether or not there is a next page.", "title": "Has Next", "type": "boolean" }, "total": { "default": 0, "description": "Total number of items returned by search over all pages.", "title": "Total", "type": "integer" }, "pages": { "default": 0, "description": "Total number of pages returned by search.", "title": "Pages", "type": "integer" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1PolicyModel": { "example": { "created_by": "user1", "created_ts": 1675292368, "deployment": "deployment_name", "description": "Description of policy", "model_name": "model_name", "model_stage": "string", "model_version": "1", "modified_by": "user2", "modified_ts": 1675292368, "name": "Example Policy Name", "policy": { "critical_level": 0.25, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25 }, "method": "preprocess", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" }, "properties": { "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the policy set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "inactive", "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `deleted`. Default value: `inactive`.", "title": "Status" }, "segments": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentModel" }, "type": "array" }, { "type": "null" } ], "default": null, "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.", "title": "Segments" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when the segment was created. Should not be changed after creation.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Timestamp of when a segment was updated. Initial timestamp at creation will be the same as `created_ts`.", "title": "Modified Ts" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String representation of the username that created the row. This should be only added on insert and never modified.", "title": "Created By" }, "modified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Modified By" } }, "required": [ "model_name", "name" ], "title": "V1PolicyModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "current_page": 1, "has_next": false, "has_previous": false, "items": [ { "created_by": "user1", "created_ts": 1675292368, "deployment": "string", "description": "Description of policy", "model_name": "string", "model_stage": "string", "model_version": "1", "modified_by": "user2", "modified_ts": 1675292368, "name": "string", "policy": { "critical_level": 2, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 50, "feature_b": 50 }, "method": "histogram", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "type": "drift", "uuid": "0" } ], "next_page": null, "page_size": 100, "pages": 1, "previous_items": 0, "previous_page": null, "total": 1 }, "required": [ "items" ] }
- Config:
json_schema_extra: dict = {‘example’: {‘items’: [{‘uuid’: ‘0’, ‘deployment’: ‘string’, ‘model_name’: ‘string’, ‘model_version’: ‘1’, ‘model_stage’: ‘string’, ‘name’: ‘string’, ‘description’: ‘Description of policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 50, ‘feature_b’: 50}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 1, ‘critical_level’: 2, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘histogram’}, ‘created_ts’: 1675292368, ‘modified_ts’: 1675292368, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}
- Fields:
- field items: List[V1PolicyModel] [Required]
- pydantic model V1PolicyModelSearch
Bases:
V1PolicyModelSearchFilters
Show JSON schema
{ "title": "V1PolicyModelSearch", "type": "object", "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "name": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Name" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "deployments": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of deployments", "title": "Deployments" }, "model_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model names.", "title": "Model Names" }, "model_version": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages.", "title": "Model Stage" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of types (e.g., `drift` and `performance`).", "title": "Type" }, "include_segments": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.", "title": "Include Segments" } }, "example": { "filters": { "deployments": [ "deployments_name_1", "deployments_name_2" ], "uuids": [ "0", "1", "2" ] }, "include_segments": true } }
- Config:
protected_namespaces: tuple = ()
populate_by_name: bool = True
alias_generator: function = <function V1PolicyModelSearch.<lambda> at 0x7f98f4e86200>
json_schema_extra: dict = {‘example’: {‘filters’: {‘uuids’: [‘0’, ‘1’, ‘2’], ‘deployments’: [‘deployments_name_1’, ‘deployments_name_2’]}, ‘include_segments’: True}}
- Fields:
- field include_segments: bool | None = False
Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.
- pydantic model V1PolicyRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1PolicyRequestModel", "type": "object", "properties": { "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the policy set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "inactive", "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `deleted`. Default value: `inactive`.", "title": "Status" }, "segments": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentModel" }, "type": "array" }, { "type": "null" } ], "default": null, "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.", "title": "Segments" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "deployment": "d_mp_placeholder_deployment", "description": "Description of Policy", "model_name": "d_mp_placeholder_deployment", "model_stage": "primary", "model_version": "1", "name": "Policy Name", "policy": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "drift_measure": "PSI", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "est_fare_amount": 25, "extra": 25, "travel_time": 25, "trip_distance": 25 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "segments": [ { "created_by": "vianai", "created_ts": 1679496214358.969, "description": "Segment Description", "filters": [ { "conjunction": "and", "feature_name": "feature_name", "operator": "=", "value": [ "256", "217" ] } ], "id": 1, "model_uuid": "ff0f98ae-5b59-48dd-8567-14efce48b4b4", "modified_by": "vianai", "modified_ts": 1679496214358.969, "name": "d_mp_placeholder_deployment_segment_1", "status": "active" } ], "status": "inactive", "type": "drift" }, "required": [ "model_name", "name" ] }
- Config:
protected_namespaces: tuple = ()
json_schema_extra: dict = {‘example’: {‘deployment’: ‘d_mp_placeholder_deployment’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name’, ‘description’: ‘Description of Policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 0.1, ‘critical_level’: 0.25, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’, ‘segments’: [{‘model_uuid’: ‘ff0f98ae-5b59-48dd-8567-14efce48b4b4’, ‘name’: ‘d_mp_placeholder_deployment_segment_1’, ‘description’: ‘Segment Description’, ‘filters’: [{‘feature_name’: ‘feature_name’, ‘value’: [‘256’, ‘217’], ‘operator’: ‘=’, ‘conjunction’: ‘and’}], ‘id’: 1, ‘status’: ‘active’, ‘created_ts’: 1679496214358.969, ‘modified_ts’: 1679496214358.969, ‘created_by’: ‘vianai’, ‘modified_by’: ‘vianai’}]}}
- Fields:
- field deployment: str | None = None
Name of the deployment for this policy.
- field description: str | None = None
Description of the policy set by user. This is a NULLABLE field.
- field model_name: str [Required]
Name of the model for this policy.
- field model_stage: str | None = None
Model stage for this policy.
- field model_version: str | None = None
Model version for this policy.
- field name: str [Required]
Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.
- field policy: V1PerformancePolicy | V1DriftPolicy = None
The JSON representation of the policy.
- field segments: List[V1SegmentModel] | None = None
List of segments used by the policy. An empty list means no segments are used by this policy; if null, the operation did not ask for the segments to be included.
- field status: str | None = 'inactive'
Field to represent the status of a policy. This field is case-insensitive. Supported values: active, inactive, archived, deleted. Default value: inactive.
- field type: str | None = 'drift'
String representation of the type of policy. This field is case-insensitive. Supported values: drift, performance. Default value if not provided is drift.
- pydantic model V1PolicyRequestModelList
Bases:
RootModel
Show JSON schema
{ "title": "V1PolicyRequestModelList", "type": "array", "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1PolicyRequestModel": { "example": { "deployment": "d_mp_placeholder_deployment", "description": "Description of Policy", "model_name": "d_mp_placeholder_deployment", "model_stage": "primary", "model_version": "1", "name": "Policy Name", "policy": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "drift_measure": "PSI", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "est_fare_amount": 25, "extra": 25, "travel_time": 25, "trip_distance": 25 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "segments": [ { "created_by": "vianai", "created_ts": 1679496214358.969, "description": "Segment Description", "filters": [ { "conjunction": "and", "feature_name": "feature_name", "operator": "=", "value": [ "256", "217" ] } ], "id": 1, "model_uuid": "ff0f98ae-5b59-48dd-8567-14efce48b4b4", "modified_by": "vianai", "modified_ts": 1679496214358.969, "name": "d_mp_placeholder_deployment_segment_1", "status": "active" } ], "status": "inactive", "type": "drift" }, "properties": { "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Name of the policy. Must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the policy set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "inactive", "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`, `deleted`. Default value: `inactive`.", "title": "Status" }, "segments": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentModel" }, "type": "array" }, { "type": "null" } ], "default": null, "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.", "title": "Segments" } }, "required": [ "model_name", "name" ], "title": "V1PolicyRequestModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": [ { "deployment": "d_mp_placeholder_deployment_1", "description": "Policy Description", "model_name": "d_mp_placeholder_deployment", "model_stage": "primary", "model_version": "1", "name": "Policy Name for distance based drift", "policy": { "critical_level": 0.15, "deployment_name": "d_mp_placeholder_deployment", "drift_measure": "PSI", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "est_fare_amount": 25, "extra": 25, "travel_time": 25, "trip_distance": 25 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "segments": [ { "created_by": "vianai", "created_ts": 1679496214358.969, "description": "Segment Description", "filters": [ { "conjunction": "and", "feature_name": "feature_name", "operator": "=", "value": [ "256", "217" ] } ], "id": 1, "model_uuid": "string", "modified_by": "vianai", "modified_ts": 1679496214358.969, "name": "d_mp_placeholder_deployment_segment_1", "status": "active" } ], "status": "inactive", "type": "drift" }, { "deployment": "d_mp_placeholder_deployment_2", "description": "Policy Description", "model_name": "d_mp_placeholder_deployment", "model_stage": "primary", "model_version": "1", "name": "Policy Name for window based drift.", "policy": { "critical_level": 15, "deployment_name": "d_mp_placeholder_deployment", "drift_measure": "PSI", "drift_type": "windowed", "feature_weightage": "equal", "feature_weights": { "est_fare_amount": 25, "extra": 25, "travel_time": 25, "trip_distance": 25 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 10, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "status": "inactive", "type": "drift" }, { "deployment": "d_mp_placeholder_deployment_3", "description": "Description of Policy", "model_name": "d_mp_placeholder_deployment", "model_stage": "primary", "model_version": "1", "name": "Policy Name for performance", "policy": { "critical_level": 0.15, "deployment_name": "d_mp_placeholder_deployment", "method": "preprocess", "metric": "mae", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "inactive", "type": "performance" } ], "items": { "$ref": "#/$defs/V1PolicyRequestModel" } }
- Config:
json_schema_extra: dict = {‘example’: [{‘deployment’: ‘d_mp_placeholder_deployment_1’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for distance based drift’, ‘description’: ‘Policy Description’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 0.1, ‘critical_level’: 0.15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’, ‘segments’: [{‘model_uuid’: ‘string’, ‘name’: ‘d_mp_placeholder_deployment_segment_1’, ‘description’: ‘Segment Description’, ‘filters’: [{‘feature_name’: ‘feature_name’, ‘value’: [‘256’, ‘217’], ‘operator’: ‘=’, ‘conjunction’: ‘and’}], ‘id’: 1, ‘status’: ‘active’, ‘created_ts’: 1679496214358.969, ‘modified_ts’: 1679496214358.969, ‘created_by’: ‘vianai’, ‘modified_by’: ‘vianai’}]}, {‘deployment’: ‘d_mp_placeholder_deployment_2’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for window based drift.’, ‘description’: ‘Policy Description’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘windowed’, ‘window_parameters’: {‘target’: {‘window_type’: ‘week’}, ‘baseline’: {‘window_method’: ‘last’, ‘window_type’: ‘week’, ‘last_amount’: 2}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘trip_distance’: 25, ‘travel_time’: 25, ‘est_fare_amount’: 25, ‘extra’: 25}, ‘drift_measure’: ‘PSI’, ‘warning_level’: 10, ‘critical_level’: 15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’}, {‘deployment’: ‘d_mp_placeholder_deployment_3’, ‘model_name’: ‘d_mp_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘Policy Name for performance’, ‘description’: ‘Description of Policy’, ‘type’: ‘performance’, ‘policy’: {‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘metric’: ‘mae’, ‘warning_level’: 0.1, ‘critical_level’: 0.15, ‘schedule’: ‘0 0 5 ? * *’, ‘deployment_name’: ‘d_mp_placeholder_deployment’, ‘method’: ‘preprocess’}, ‘status’: ‘inactive’}]}
- Fields:
- field root: List[V1PolicyRequestModel] [Required]
- pydantic model V1PolicySearchRequest
Bases:
V1PageSearch
,V1PolicyModelSearch
Show JSON schema
{ "title": "V1PolicySearchRequest", "type": "object", "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "name": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Name" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "deployments": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of deployments", "title": "Deployments" }, "model_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model names.", "title": "Model Names" }, "model_version": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages.", "title": "Model Stage" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of types (e.g., `drift` and `performance`).", "title": "Type" }, "include_segments": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.", "title": "Include Segments" }, "page": { "default": 1, "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`).", "title": "Page", "type": "integer" }, "page_size": { "default": 25, "description": "Number of items to return on a page. Default is 25 items per page.", "title": "Page Size", "type": "integer" }, "order": { "anyOf": [ { "items": { "$ref": "#/$defs/V1OrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Fields to use for ordering returned pages and the sort direction.", "title": "Order" }, "search": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String to search for (case-insensitive) across all fields in previously created items.", "title": "Search" }, "filters": { "anyOf": [ { "$ref": "#/$defs/V1PolicyModelSearch" }, { "type": "null" } ], "default": null, "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved." } }, "$defs": { "V1OrderBy": { "properties": { "field": { "description": "Field to order by.", "title": "Field", "type": "string" }, "direction": { "default": "ASC", "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).", "enum": [ "ASC", "DESC" ], "title": "Direction", "type": "string" } }, "required": [ "field" ], "title": "V1OrderBy", "type": "object" }, "V1PolicyModelSearch": { "example": { "filters": { "deployments": [ "deployments_name_1", "deployments_name_2" ], "uuids": [ "0", "1", "2" ] }, "include_segments": true }, "properties": { "created_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created Bys" }, "modified_bys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified Bys" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of uuids for this operation.", "title": "Uuids" }, "name": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of names for this operation.", "title": "Name" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of statuses for this operation.", "title": "Statuses" }, "deployments": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of deployments", "title": "Deployments" }, "model_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model names.", "title": "Model Names" }, "model_version": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model versions.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of model stages.", "title": "Model Stage" }, "type": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of types (e.g., `drift` and `performance`).", "title": "Type" }, "include_segments": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Flag to determine whether or not segments associated with the policy should be returned. By default, segments are not returned.", "title": "Include Segments" } }, "title": "V1PolicyModelSearch", "type": "object" } }, "example": { "filters": { "deployments": [ "string1" ], "uuids": [ "00", "11" ] }, "order": [ { "direction": "DESC", "field": "name" } ], "page": 1, "page_size": 100 } }
- Config:
protected_namespaces: tuple = ()
populate_by_name: bool = True
alias_generator: function = <function V1PolicyModelSearch.<lambda> at 0x7f98f4e86200>
json_schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘filters’: {‘uuids’: [‘00’, ‘11’], ‘deployments’: [‘string1’]}}}
- Fields:
- field filters: V1PolicyModelSearch | None = None
Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.
- pydantic model V1PolicyUpdateModelList
Bases:
RootModel
Show JSON schema
{ "title": "V1PolicyUpdateModelList", "type": "array", "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1PolicyUpdateRequestModel": { "example": { "description": "Description of policy", "policy": { "critical_level": 2, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25, "feature_c": 25, "feature_d": 25 }, "method": "histogram", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" }, "properties": { "uuid": { "default": null, "description": "Unique identifier for policy.", "title": "Uuid", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" }, { "type": "null" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`,`delete`.", "title": "Status" } }, "title": "V1PolicyUpdateRequestModel", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "items": { "$ref": "#/$defs/V1PolicyUpdateRequestModel" } }
- field root: List[V1PolicyUpdateRequestModel] [Required]
- pydantic model V1PolicyUpdateRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1PolicyUpdateRequestModel", "type": "object", "properties": { "uuid": { "default": null, "description": "Unique identifier for policy.", "title": "Uuid", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment set by user. This is a NULLABLE field.", "title": "Description" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "drift", "description": "String representation of the type of policy. This field is case-insensitive. Supported values: `drift`, `performance`. Default value if not provided is `drift`.", "title": "Type" }, "policy": { "anyOf": [ { "$ref": "#/$defs/V1PerformancePolicy" }, { "$ref": "#/$defs/V1DriftPolicy" }, { "type": "null" } ], "default": null, "description": "The JSON representation of the policy.", "title": "Policy" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Field to represent the status of a policy. This field is case-insensitive. Supported values: `active`, `inactive`, `archived`,`delete`.", "title": "Status" } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1DriftPolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "type": { "description": "The drift category. Supported values: `feature-drift`, `prediction-drift`.", "title": "Type", "type": "string" }, "drift_type": { "description": "The type of drift. Supported values: `distance`, `windowed`.", "title": "Drift Type", "type": "string" }, "select_features_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The features to be included in drift policy. Supported values: `custom`, `all`.", "title": "Select Features Type" }, "feature_weightage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The weight category selected for the included features. Supported values: `equal`, `manual`.", "title": "Feature Weightage" }, "feature_weights": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The specific weight given to each feature.", "title": "Feature Weights" }, "drift_measure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The drift measure. Supported values: `PSI`, `JS`.", "title": "Drift Measure" }, "baseline_bins": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "The custom bin dictionary for which to run drift against per feature.", "title": "Baseline Bins" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "type", "drift_type" ], "title": "V1DriftPolicy", "type": "object" }, "V1HotspotParamsModel": { "example": { "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 } }, "properties": { "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" ], "title": "Method", "type": "string" }, "value": { "description": "Integer value that correlates to the selected method. If using percent as the selected method, number can never be greater than 100.", "title": "Value", "type": "integer" }, "features": { "description": "List of hotspot features (of categorical data type) to be used when performing hotspot analysis.", "items": { "type": "string" }, "title": "Features", "type": "array" } }, "required": [ "method", "value", "features" ], "title": "V1HotspotParamsModel", "type": "object" }, "V1PerformancePolicy": { "example": { "critical_level": 0.25, "deployment_name": "d_mp_placeholder_deployment", "hotspot": { "features": [ "a", "b", "c" ], "method": "flat", "value": 50 }, "method": "preprocess", "schedule": "0 0 5 ? * *", "warning_level": 0.1, "window_parameters": { "baseline": { "last_amount": 2, "window_method": "last", "window_type": "week" }, "target": { "window_type": "week" } } }, "properties": { "window_parameters": { "$ref": "#/$defs/V1WindowParameters", "description": "The window parameters, which include the target and baseline parameters." }, "warning_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Warning Level" }, "critical_level": { "anyOf": [ { "type": "number" }, { "type": "integer" } ], "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.", "title": "Critical Level" }, "schedule": { "description": "The cron scheduleer.", "title": "Schedule", "type": "string" }, "deployment_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the deployment the policy belongs to.", "title": "Deployment Name" }, "method": { "description": "The drift method.", "title": "Method", "type": "string" }, "hotspot_analysis": { "anyOf": [ { "$ref": "#/$defs/V1HotspotParamsModel" }, { "type": "null" } ], "default": { "method": "percent", "value": 100, "features": [] }, "description": "Parameters that determine the features to run hotspot analysis against and level of traffic to include." }, "metric": { "description": "The performance metric. See the User Guide 'Metrics' page for guidance.", "title": "Metric", "type": "string" }, "ground_truth_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The ground truth threshold value (percentage).", "title": "Ground Truth Threshold" } }, "required": [ "window_parameters", "warning_level", "critical_level", "schedule", "method", "metric" ], "title": "V1PerformancePolicy", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" }, "V1WindowParameters": { "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "required": [ "target", "baseline" ], "title": "V1WindowParameters", "type": "object" } }, "example": { "description": "Description of policy", "policy": { "critical_level": 2, "drift_measure": "distance_JS", "drift_type": "distance", "feature_weightage": "equal", "feature_weights": { "feature_a": 25, "feature_b": 25, "feature_c": 25, "feature_d": 25 }, "method": "histogram", "schedule": "0 0 0 ? * *", "select_features_type": "custom", "type": "feature-drift", "warning_level": 1, "window_parameters": { "baseline": { "window_method": "prior", "window_type": "day" }, "target": { "window_type": "day" } } }, "status": "active", "type": "drift", "uuid": "0" } }
- Config:
json_schema_extra: dict = {‘example’: {‘uuid’: ‘0’, ‘description’: ‘Description of policy’, ‘type’: ‘drift’, ‘policy’: {‘type’: ‘feature-drift’, ‘drift_type’: ‘distance’, ‘window_parameters’: {‘target’: {‘window_type’: ‘day’}, ‘baseline’: {‘window_method’: ‘prior’, ‘window_type’: ‘day’}}, ‘select_features_type’: ‘custom’, ‘feature_weightage’: ‘equal’, ‘feature_weights’: {‘feature_a’: 25, ‘feature_b’: 25, ‘feature_c’: 25, ‘feature_d’: 25}, ‘drift_measure’: ‘distance_JS’, ‘warning_level’: 1, ‘critical_level’: 2, ‘schedule’: ‘0 0 0 ? * *’, ‘method’: ‘histogram’}, ‘status’: ‘active’}}
- Fields:
- field description: str | None = None
Description of the segment set by user. This is a NULLABLE field.
- field policy: V1PerformancePolicy | V1DriftPolicy | None = None
The JSON representation of the policy.
- field status: str | None = None
Field to represent the status of a policy. This field is case-insensitive. Supported values: active, inactive, archived,`delete`.
- field type: str | None = 'drift'
String representation of the type of policy. This field is case-insensitive. Supported values: drift, performance. Default value if not provided is drift.
- field uuid: str = None
Unique identifier for policy.
- pydantic model V1Target
Bases:
BaseModel
Show JSON schema
{ "title": "V1Target", "type": "object", "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ] }
- Fields:
- field offset: int | None = None
The offset amount.
- field offset_type: str | None = None
The policy`s offset type. Accepted values include: week, month, and quarter.
- field process_date: str | None = None
The process date.
- field quarter_start: str | None = None
The date to start the quarter.
- field start_of_week: str | None = None
The start day of week. Supported values: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
- field window_type: str [Required]
The target window type. Accepted values include: day, week, month, quarter, and year.
- field year_start: str | None = None
The date to start the year.
- pydantic model V1WindowParameters
Bases:
BaseModel
Show JSON schema
{ "title": "V1WindowParameters", "type": "object", "properties": { "target": { "$ref": "#/$defs/V1Target", "description": "The target parameters." }, "baseline": { "$ref": "#/$defs/V1Baseline", "description": "The baseline parameters." } }, "$defs": { "V1Baseline": { "properties": { "window_method": { "description": "The window method. Supported values: `prior`, `last`, `same_prior_year`, `training` .", "title": "Window Method", "type": "string" }, "window_type": { "description": "The baseline window type. Supported values: `day`, `week`, `month`, `quarter`, `year`, `training`.", "title": "Window Type", "type": "string" }, "last_amount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The last amount of `prior` or `last` for the given window type.", "title": "Last Amount" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Supported values: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_method", "window_type" ], "title": "V1Baseline", "type": "object" }, "V1Target": { "properties": { "window_type": { "description": "The target window type. Accepted values include: `day`, `week`, `month`, `quarter`, and `year`.", "title": "Window Type", "type": "string" }, "process_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The process date.", "title": "Process Date" }, "offset_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The policy`s offset type. Accepted values include: `week`, `month`, and `quarter`.", "title": "Offset Type" }, "offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The offset amount.", "title": "Offset" }, "start_of_week": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The start day of week. Supported values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.", "title": "Start Of Week" }, "quarter_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the quarter.", "title": "Quarter Start" }, "year_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The date to start the year.", "title": "Year Start" } }, "required": [ "window_type" ], "title": "V1Target", "type": "object" } }, "required": [ "target", "baseline" ] }
- Fields:
- field baseline: V1Baseline [Required]
The baseline parameters.
vianops_client.models.modelstore.segments
- pydantic model V1BetweenOperatorModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1BetweenOperatorModel", "type": "object", "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } } }
- Fields:
- field max: float = None
Maximum value of BETWEEN.
- field min: float = None
Minimum value of BETWEEN.
- pydantic model V1DataPreviewModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1DataPreviewModel", "type": "object", "properties": { "items": { "description": "Segment data preview.", "items": { "type": "object" }, "title": "Items", "type": "array" }, "count": { "description": "Record count.", "title": "Count", "type": "integer" }, "table": { "description": "Name of table from which query was ran against to retrieve data preview.", "title": "Table", "type": "string" } }, "example": { "count": 200000, "items": [ { "feature_a": 1, "feature_b": "cat" } ], "table": "1691623334145_dit" }, "required": [ "items", "count", "table" ] }
- Config:
from_attributes: bool = True
json_schema_extra: dict = {‘example’: {‘items’: [{‘feature_a’: 1, ‘feature_b’: ‘cat’}], ‘count’: 200000, ‘table’: ‘1691623334145_dit’}}
- Fields:
- field count: int [Required]
Record count.
- field items: List[dict] [Required]
Segment data preview.
- field table: str [Required]
Name of table from which query was ran against to retrieve data preview.
- pydantic model V1DataPreviewRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1DataPreviewRequestModel", "type": "object", "properties": { "feature_type": { "default": "inference", "description": "Does the featureset belong to Training or Inference", "enum": [ "inference", "training" ], "title": "Feature Type", "type": "string" }, "inference_table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Inference table name.", "title": "Inference Table Name" }, "training_table_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Featureset name. Required if the value of `feature_type` is `training`.", "title": "Training Table Name" }, "segment_filters": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters, their conditions, and relationships.", "title": "Segment Filters" }, "start_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "Amount of records to display starting from this date. Defaults to yesterday's date.", "title": "Start Date" }, "end_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "Amount of records to display up to this date. Defaults to yesterday's date.", "title": "End Date" }, "feature_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Index for the corresponding featureset (inference mapping index or feature source index)", "title": "Feature Index" }, "limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1000, "description": "Maximum amount of records to display. Default value: 1000", "title": "Limit" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "count": false, "end_date": "2023-03-20", "inference_mapping_index": 1, "limit": 100, "segment_filters": [ { "feature_name": "FEATURE NAME", "operator": "TOP", "value": 10 } ], "start_date": "2023-03-20" } }
- Config:
from_attributes: bool = True
json_schema_extra: dict = {‘example’: {‘segment_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘TOP’, ‘value’: 10}], ‘start_date’: ‘2023-03-20’, ‘end_date’: ‘2023-03-20’, ‘inference_mapping_index’: 1, ‘limit’: 100, ‘count’: False}}
- Fields:
- field end_date: date | None = None
Amount of records to display up to this date. Defaults to yesterday’s date.
- field feature_index: int | None = None
Index for the corresponding featureset (inference mapping index or feature source index)
- field feature_type: Literal['inference', 'training'] = 'inference'
Does the featureset belong to Training or Inference
- field inference_table_name: str | None = None
Inference table name.
- field limit: int | None = 1000
Maximum amount of records to display. Default value: 1000
- field segment_filters: List[V1SegmentFilterModel] | None = None
List of segment filters, their conditions, and relationships.
- field start_date: date | None = None
Amount of records to display starting from this date. Defaults to yesterday’s date.
- field training_table_name: str | None = None
Featureset name. Required if the value of feature_type is training.
- pydantic model V1SegmentBaseModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentBaseModel", "type": "object", "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "name": "NAME" }, "required": [ "model_uuid", "name", "filters" ] }
- Config:
protected_namespaces: tuple = ()
json_schema_extra: dict = {‘example’: {‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}]}}
- Fields:
- field description: str | None = None
Description of the segment.
- field filters: List[V1SegmentFilterModel] [Required]
List of segment filters, their conditions, and relationships.
- field model_uuid: str [Required]
Unique identifier for model.
- field name: str [Required]
Name of the segment.
- pydantic model V1SegmentBaseModelList
Bases:
RootModel
Show JSON schema
{ "title": "V1SegmentBaseModelList", "type": "array", "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentBaseModel": { "example": { "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "name": "NAME" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" } }, "required": [ "model_uuid", "name", "filters" ], "title": "V1SegmentBaseModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": [ { "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "name": "NAME" } ], "items": { "$ref": "#/$defs/V1SegmentBaseModel" } }
- Config:
json_schema_extra: dict = {‘example’: [{‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}]}]}
- Fields:
- field root: List[V1SegmentBaseModel] [Required]
- pydantic model V1SegmentFilterCondition
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentFilterCondition", "type": "object", "properties": { "condition": { "description": "Condition generated from specified Segment Filter id, table, and connection specified.", "title": "Condition", "type": "string" } }, "example": { "condition": "feature_name > 10" }, "required": [ "condition" ] }
- Config:
json_schema_extra: dict = {‘example’: {‘condition’: ‘feature_name > 10’}}
- Fields:
- field condition: str [Required]
Condition generated from specified Segment Filter id, table, and connection specified.
- pydantic model V1SegmentFilterModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentFilterModel", "type": "object", "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } }
- Config:
from_attributes: bool = True
extra: str = forbid
json_schema_extra: dict = {‘example’: {‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: ‘AND’, ‘grouped_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: ‘AND’}]}}
- Fields:
- Validators:
- field conjunction: str | None = None
Relationship to next filter. If there is no next filter, set to null. This field is case-insensitive. Supported values: AND, OR, null. Default value is null.
- field feature_name: str | None = None
Name of feature field to do the operation on.
- field grouped_filters: List[dict] | None = None
List of grouped filters. Use for creating a nested filter within a filter.
- Validated by:
- field operator: str | None = None
Operation to perform on the feature field. This field is case-insensitive. Supported operators: =, >, <, <=, >=, BETWEEN, TOP, BOTTOM, DISTINCT
- Validated by:
- field value: List[str | int | bool | float] | str | int | bool | float | V1BetweenOperatorModel | V1TopBottomOperatorModel | None = None
Values of operator doing the filter. Value types supported are based on operator.
- validator grouped_filters_validator » grouped_filters
- pydantic model V1SegmentModel
Bases:
V1SegmentBaseModel
Show JSON schema
{ "title": "V1SegmentModel", "type": "object", "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ] }
- Config:
protected_namespaces: tuple = ()
json_schema_extra: dict = {‘example’: {‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}
from_attributes: bool = True
- Fields:
- field created_by: str [Required]
User who created the segment.
- field created_ts: float | datetime [Required]
Timestamp (Unix time in milliseconds) generated when the segment is created. You can specify the timestamp as a float or date time string value.
- field id: int [Required]
Unique identifier generated by the platform for the segment.
- field modified_by: str [Required]
User who last modified the segment.
- field modified_ts: float | datetime [Required]
Timestamp (Unix time in milliseconds) generated when the segment is modified. You can specify the timestamp as a float or date time string value.
- field status: str [Required]
Current status of the segment. This field is case-insensitive. Possible values: active, inactive (default), archived, delete.
- pydantic model V1SegmentModelList
Bases:
RootModel
Show JSON schema
{ "title": "V1SegmentModelList", "type": "array", "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentWithPoliciesModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "policies": [ { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" } ], "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" }, "policies": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SimplePolicyModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policies using this segment. An empty list means no policies use this segment; if `null`, the search did not ask for the policies to be included.", "title": "Policies" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentWithPoliciesModel", "type": "object" }, "V1SimplePolicyModel": { "example": { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" }, "properties": { "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" } }, "required": [ "model_name", "name" ], "title": "V1SimplePolicyModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "items": { "$ref": "#/$defs/V1SegmentWithPoliciesModel" } }
- field root: List[V1SegmentWithPoliciesModel] [Required]
- pydantic model V1SegmentModelPage
Bases:
V1PageModel
Show JSON schema
{ "title": "V1SegmentModelPage", "type": "object", "properties": { "items": { "default": [], "description": "Segments returned by search in page.", "items": { "$ref": "#/$defs/V1SegmentWithPoliciesModel" }, "title": "Items", "type": "array" }, "current_page": { "default": 0, "description": "Current page of items.", "title": "Current Page", "type": "integer" }, "page_size": { "default": 0, "description": "Number of items on a page.", "title": "Page Size", "type": "integer" }, "previous_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the previous page.", "title": "Previous Page" }, "next_page": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of the next page.", "title": "Next Page" }, "has_previous": { "default": false, "description": "Whether or not there is a previous page.", "title": "Has Previous", "type": "boolean" }, "previous_items": { "default": 0, "title": "Previous Items", "type": "integer" }, "has_next": { "default": false, "description": "Whether or not there is a next page.", "title": "Has Next", "type": "boolean" }, "total": { "default": 0, "description": "Total number of items returned by search over all pages.", "title": "Total", "type": "integer" }, "pages": { "default": 0, "description": "Total number of pages returned by search.", "title": "Pages", "type": "integer" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentWithPoliciesModel": { "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "policies": [ { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" } ], "status": "inactive" }, "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" }, "policies": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SimplePolicyModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policies using this segment. An empty list means no policies use this segment; if `null`, the search did not ask for the policies to be included.", "title": "Policies" } }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ], "title": "V1SegmentWithPoliciesModel", "type": "object" }, "V1SimplePolicyModel": { "example": { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" }, "properties": { "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" } }, "required": [ "model_name", "name" ], "title": "V1SimplePolicyModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "current_page": 1, "has_next": false, "has_previous": false, "items": [ { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "status": "inactive" } ], "next_page": null, "page_size": 100, "pages": 1, "previous_items": 0, "previous_page": null, "total": 1 } }
- Config:
json_schema_extra: dict = {‘example’: {‘items’: [{‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}], ‘current_page’: 1, ‘page_size’: 100, ‘previous_page’: None, ‘next_page’: None, ‘has_previous’: False, ‘previous_items’: 0, ‘has_next’: False, ‘total’: 1, ‘pages’: 1}}
- Fields:
- field items: List[V1SegmentWithPoliciesModel] = []
Segments returned by search in page.
- pydantic model V1SegmentPageSearch
Bases:
V1PageSearch
,V1SegmentSearch
Show JSON schema
{ "title": "V1SegmentPageSearch", "type": "object", "properties": { "created_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created By" }, "modified_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified By" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "id": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment ids.", "title": "Id" }, "model_uuid": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of specific model uuids.", "title": "Model Uuid" }, "name": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment names.", "title": "Name" }, "segment_filters": { "anyOf": [ { "items": { "items": { "type": "object" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters to search for.", "title": "Segment Filters" }, "status": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.", "title": "Status" }, "include_policies": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.", "title": "Include Policies" }, "page": { "default": 1, "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`).", "title": "Page", "type": "integer" }, "page_size": { "default": 25, "description": "Number of items to return on a page. Default is 25 items per page.", "title": "Page Size", "type": "integer" }, "order": { "anyOf": [ { "items": { "$ref": "#/$defs/V1OrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Fields to use for ordering returned pages and the sort direction.", "title": "Order" }, "search": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String to search for (case-insensitive) across all fields in previously created items.", "title": "Search" }, "filters": { "anyOf": [ { "$ref": "#/$defs/V1SegmentSearchFilter" }, { "type": "null" } ], "default": null, "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved." } }, "$defs": { "V1OrderBy": { "properties": { "field": { "description": "Field to order by.", "title": "Field", "type": "string" }, "direction": { "default": "ASC", "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).", "enum": [ "ASC", "DESC" ], "title": "Direction", "type": "string" } }, "required": [ "field" ], "title": "V1OrderBy", "type": "object" }, "V1SegmentSearchFilter": { "properties": { "created_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created By" }, "modified_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified By" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment ids.", "title": "Ids" }, "model_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of specific model uuids.", "title": "Model Uuids" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment names.", "title": "Names" }, "segment_filters": { "anyOf": [ { "items": { "items": { "type": "object" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters to search for.", "title": "Segment Filters" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.", "title": "Statuses" } }, "title": "V1SegmentSearchFilter", "type": "object" } }, "example": { "filters": { "ids": [ 1, 2, 3 ], "names": [ "NAME" ] }, "order": [ { "direction": "DESC", "field": "name" } ], "page": 1, "page_size": 25, "search": "SEARCH" } }
- Config:
populate_by_name: bool = True
protected_namespaces: tuple = ()
alias_generator: function = <function V1SegmentPageSearch.<lambda> at 0x7f98f4e76de0>
json_schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 25, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘search’: ‘SEARCH’, ‘filters’: {‘ids’: [1, 2, 3], ‘names’: [‘NAME’]}}}
- Fields:
- field search_filters: V1SegmentSearchFilter | None = None (alias 'filters')
Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.
- pydantic model V1SegmentPreviewModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentPreviewModel", "type": "object", "properties": { "items": { "description": "Segment data preview.", "items": { "type": "object" }, "title": "Items", "type": "array" }, "count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Record count.", "title": "Count" } }, "example": { "count": 200000, "items": [ { "feature_a": 1, "feature_b": "cat" } ] }, "required": [ "items" ] }
- Config:
from_attributes: bool = True
json_schema_extra: dict = {‘example’: {‘items’: [{‘feature_a’: 1, ‘feature_b’: ‘cat’}], ‘count’: 200000}}
- Fields:
- field count: int | None = None
Record count.
- field items: List[dict] [Required]
Segment data preview.
- pydantic model V1SegmentPreviewRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentPreviewRequestModel", "type": "object", "properties": { "segment_filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Segment Filters", "type": "array" }, "start_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "Amount of records to display starting from this date. Defaults to yesterday's date.", "title": "Start Date" }, "end_date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "description": "Amount of records to display up to this date. Defaults to yesterday's date.", "title": "End Date" }, "inference_mapping_index": { "default": null, "description": "Inference mapping index.", "title": "Inference Mapping Index", "type": "integer" }, "limit": { "default": 1000, "description": "Maximum amount of records to display. Default value: 1000", "title": "Limit", "type": "integer" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "count": false, "end_date": "2023-03-20", "inference_mapping_index": 1, "limit": 100, "segment_filters": [ { "feature_name": "FEATURE NAME", "operator": "TOP", "value": 10 } ], "start_date": "2023-03-20" }, "required": [ "segment_filters" ] }
- Config:
from_attributes: bool = True
json_schema_extra: dict = {‘example’: {‘segment_filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘TOP’, ‘value’: 10}], ‘start_date’: ‘2023-03-20’, ‘end_date’: ‘2023-03-20’, ‘inference_mapping_index’: 1, ‘limit’: 100, ‘count’: False}}
- Fields:
- field end_date: date | None = None
Amount of records to display up to this date. Defaults to yesterday’s date.
- field inference_mapping_index: int = None
Inference mapping index.
- field limit: int = 1000
Maximum amount of records to display. Default value: 1000
- field segment_filters: List[V1SegmentFilterModel] [Required]
List of segment filters, their conditions, and relationships.
- field start_date: date | None = None
Amount of records to display starting from this date. Defaults to yesterday’s date.
- pydantic model V1SegmentSearch
Bases:
V1SegmentSearchFilter
Show JSON schema
{ "title": "V1SegmentSearch", "type": "object", "properties": { "created_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'created by' users to search for.", "title": "Created By" }, "modified_by": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of 'modified by' users to search for.", "title": "Modified By" }, "created_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts Start" }, "created_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects created during a specified time period.", "title": "Created Ts End" }, "modified_ts_start": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts Start" }, "modified_ts_end": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.", "title": "Modified Ts End" }, "ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment ids.", "title": "Ids" }, "model_uuids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of specific model uuids.", "title": "Model Uuids" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment names.", "title": "Names" }, "segment_filters": { "anyOf": [ { "items": { "items": { "type": "object" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters to search for.", "title": "Segment Filters" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment statuses. This field is case-insensitive. Possible values: `active`, `inactive`, `archived`, `delete`.", "title": "Statuses" }, "include_policies": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.", "title": "Include Policies" } }, "example": { "filters": { "ids": [ 1, 2, 3 ], "names": [ "NAME" ] }, "include_policies": true } }
- Config:
populate_by_name: bool = True
protected_namespaces: tuple = ()
alias_generator: function = <function V1SegmentSearchFilter.<lambda> at 0x7f98f4e85940>
json_schema_extra: dict = {‘example’: {‘filters’: {‘ids’: [1, 2, 3], ‘names’: [‘NAME’]}, ‘include_policies’: True}}
- Fields:
- field include_policies: bool | None = False
Flag to determine whether or not policies associated with the segment should be included in the operation. By default, policies are not included.
- pydantic model V1SegmentUpdateRequestModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SegmentUpdateRequestModel", "type": "object", "properties": { "id": { "default": null, "description": "Identifier for segment.", "title": "Id", "type": "integer" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the segment set by the user.", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment set by user. This is a NULLABLE field.", "title": "Description" }, "filters": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters, their conditions, and relationships.", "title": "Filters" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "description": "DESCRIPTION", "filters": [ { "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "name": "NAME" } }
- Config:
json_schema_extra: dict = {‘example’: {‘id’: 1, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’]}]}}
- Fields:
- field description: str | None = None
Description of the segment set by user. This is a NULLABLE field.
- field filters: List[V1SegmentFilterModel] | None = None
List of segment filters, their conditions, and relationships.
- field id: int = None
Identifier for segment.
- field name: str | None = None
Name of the segment set by the user.
- pydantic model V1SegmentUpdateRequestModelList
Bases:
RootModel
Show JSON schema
{ "title": "V1SegmentUpdateRequestModelList", "type": "array", "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SegmentUpdateRequestModel": { "example": { "description": "DESCRIPTION", "filters": [ { "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "name": "NAME" }, "properties": { "id": { "default": null, "description": "Identifier for segment.", "title": "Id", "type": "integer" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the segment set by the user.", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment set by user. This is a NULLABLE field.", "title": "Description" }, "filters": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of segment filters, their conditions, and relationships.", "title": "Filters" } }, "title": "V1SegmentUpdateRequestModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "items": { "$ref": "#/$defs/V1SegmentUpdateRequestModel" } }
- field root: List[V1SegmentUpdateRequestModel] [Required]
- pydantic model V1SegmentWithPoliciesModel
Bases:
V1SegmentModel
Show JSON schema
{ "title": "V1SegmentWithPoliciesModel", "type": "object", "properties": { "model_uuid": { "description": "Unique identifier for model.", "title": "Model Uuid", "type": "string" }, "name": { "description": "Name of the segment.", "title": "Name", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Description of the segment.", "title": "Description" }, "filters": { "description": "List of segment filters, their conditions, and relationships.", "items": { "$ref": "#/$defs/V1SegmentFilterModel" }, "title": "Filters", "type": "array" }, "id": { "description": "Unique identifier generated by the platform for the segment.", "title": "Id", "type": "integer" }, "status": { "description": "Current status of the segment. This field is case-insensitive. Possible values: `active`, `inactive` (default), `archived`, `delete`.", "title": "Status", "type": "string" }, "created_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Created Ts" }, "modified_ts": { "anyOf": [ { "type": "number" }, { "format": "date-time", "type": "string" } ], "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.", "title": "Modified Ts" }, "created_by": { "description": "User who created the segment.", "title": "Created By", "type": "string" }, "modified_by": { "description": "User who last modified the segment.", "title": "Modified By", "type": "string" }, "policies": { "anyOf": [ { "items": { "$ref": "#/$defs/V1SimplePolicyModel" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of policies using this segment. An empty list means no policies use this segment; if `null`, the search did not ask for the policies to be included.", "title": "Policies" } }, "$defs": { "V1BetweenOperatorModel": { "properties": { "min": { "default": null, "description": "Minimum value of BETWEEN.", "title": "Min", "type": "number" }, "max": { "default": null, "description": "Maximum value of BETWEEN.", "title": "Max", "type": "number" } }, "title": "V1BetweenOperatorModel", "type": "object" }, "V1SegmentFilterModel": { "additionalProperties": false, "example": { "conjunction": "AND", "feature_name": "FEATURE NAME", "grouped_filters": [ { "conjunction": "AND", "feature_name": "FEATURE NAME", "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] }, "properties": { "feature_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of feature field to do the operation on.", "title": "Feature Name" }, "value": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" } ] }, "type": "array" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "number" }, { "$ref": "#/$defs/V1BetweenOperatorModel" }, { "$ref": "#/$defs/V1TopBottomOperatorModel" }, { "type": "null" } ], "default": null, "description": "Values of operator doing the filter. Value types supported are based on operator.", "title": "Value" }, "operator": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Operation to perform on the feature field. This field is case-insensitive. Supported operators: `=`, `>`, `<`, `<=`, `>=`, `BETWEEN`, `TOP`, `BOTTOM`, `DISTINCT`", "title": "Operator" }, "conjunction": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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`.", "title": "Conjunction" }, "grouped_filters": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of grouped filters. Use for creating a nested filter within a filter.", "title": "Grouped Filters" } }, "title": "V1SegmentFilterModel", "type": "object" }, "V1SimplePolicyModel": { "example": { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" }, "properties": { "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" } }, "required": [ "model_name", "name" ], "title": "V1SimplePolicyModel", "type": "object" }, "V1TopBottomOperatorModel": { "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } }, "title": "V1TopBottomOperatorModel", "type": "object" } }, "example": { "created_by": "user1", "created_ts": 1672531200000, "description": "DESCRIPTION", "filters": [ { "conjunction": null, "feature_name": "FEATURE NAME", "grouped_filters": null, "operator": "=", "value": [ "VALUE 1", "VALUE 2" ] } ], "id": 1, "model_uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab", "modified_by": "user2", "modified_ts": 1672531200000, "name": "NAME", "policies": [ { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" } ], "status": "inactive" }, "required": [ "model_uuid", "name", "filters", "id", "status", "created_ts", "modified_ts", "created_by", "modified_by" ] }
- Config:
protected_namespaces: tuple = ()
json_schema_extra: dict = {‘example’: {‘id’: 1, ‘model_uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘name’: ‘NAME’, ‘description’: ‘DESCRIPTION’, ‘filters’: [{‘grouped_filters’: None, ‘feature_name’: ‘FEATURE NAME’, ‘operator’: ‘=’, ‘value’: [‘VALUE 1’, ‘VALUE 2’], ‘conjunction’: None}], ‘status’: ‘inactive’, ‘policies’: [{‘uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘deployment’: ‘deployment name’, ‘model_name’: ‘model name’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘name’}], ‘created_ts’: 1672531200000, ‘modified_ts’: 1672531200000, ‘created_by’: ‘user1’, ‘modified_by’: ‘user2’}}
from_attributes: bool = True
- Fields:
- field policies: List[V1SimplePolicyModel] | None = None
List of policies using this segment. An empty list means no policies use this segment; if null, the search did not ask for the policies to be included.
- pydantic model V1SimplePolicyModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1SimplePolicyModel", "type": "object", "properties": { "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Unique identifier for policy.", "title": "Uuid" }, "deployment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the deployment for this policy.", "title": "Deployment" }, "model_name": { "description": "Name of the model for this policy.", "title": "Model Name", "type": "string" }, "model_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model version for this policy.", "title": "Model Version" }, "model_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the model stage for this policy.", "title": "Model Stage" }, "name": { "description": "Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.", "title": "Name", "type": "string" } }, "example": { "deployment": "deployment name", "model_name": "model name", "model_stage": "primary", "model_version": "1", "name": "name", "uuid": "5efc9544-e84a-4a94-9e6d-5774e1c609ab" }, "required": [ "model_name", "name" ] }
- Config:
protected_namespaces: tuple = ()
from_attributes: bool = True
json_schema_extra: dict = {‘example’: {‘uuid’: ‘5efc9544-e84a-4a94-9e6d-5774e1c609ab’, ‘deployment’: ‘deployment name’, ‘model_name’: ‘model name’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘name’: ‘name’}}
- Fields:
- field deployment: str | None = None
Name of the deployment for this policy.
- field model_name: str [Required]
Name of the model for this policy.
- field model_stage: str | None = None
Name of the model stage for this policy.
- field model_version: str | None = None
Name of the model version for this policy.
- field name: str [Required]
Policy name, which must be unique to the deployment, model_name, model_version, and model_stage.
- field uuid: str | None = None
Unique identifier for policy.
- pydantic model V1TopBottomOperatorModel
Bases:
BaseModel
Show JSON schema
{ "title": "V1TopBottomOperatorModel", "type": "object", "properties": { "direction": { "default": "DESC", "description": "Direction of field values. This field is case-insensitive. Supported directions: `ASC` (ascending), `DESC` (descending). Default is `DESC`.", "title": "Direction", "type": "string" }, "method": { "default": "flat", "description": "Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: `percent`, `flat`. Default is `flat`.", "title": "Method", "type": "string" }, "value": { "default": null, "description": "Percent or flat number of rows to take.", "title": "Value", "type": "number" } } }
- Fields:
- field direction: str = 'DESC'
Direction of field values. This field is case-insensitive. Supported directions: ASC (ascending), DESC (descending). Default is DESC.
- field method: str = 'flat'
Whether it should be the top/bottom percent or flat amount. This field is case-insensitive. Supported methods: percent, flat. Default is flat.
- field value: float = None
Percent or flat number of rows to take.