Inference store objects

Objects and models for inference mapping, inference tracking, and performance metrics. See supported Inference store APIs.

vianops_client.models.inferencestore.inference_mapping

pydantic model V1InferenceMappingColumnSchema

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceMappingColumnSchema",
   "type": "object",
   "properties": {
      "feature_id": {
         "title": "Feature Id",
         "description": "Id of the feature, generated by the platform for optimization.",
         "type": "integer"
      },
      "name": {
         "title": "Name",
         "description": "Name of column.",
         "type": "string"
      },
      "dtype": {
         "title": "Dtype",
         "description": "Data type of column. For example, `float64`.",
         "type": "string"
      },
      "sql_type": {
         "title": "Sql Type",
         "description": "SQL data type of column. For example, `Float32`.",
         "type": "string"
      },
      "feature_type": {
         "title": "Feature Type",
         "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
         "type": "string"
      },
      "segmentation": {
         "title": "Segmentation",
         "description": "If true (the default), the column is enabled for segmentation calculations.",
         "default": true,
         "type": "boolean"
      },
      "drift": {
         "title": "Drift",
         "description": "If true (the default), the column is enabled for drift calculations.",
         "default": true,
         "type": "boolean"
      },
      "hotspot": {
         "title": "Hotspot",
         "description": "If true (the default), the column is enabled for hotspot analysis.",
         "default": false,
         "type": "boolean"
      },
      "rca": {
         "title": "Rca",
         "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
         "default": [],
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "round": {
         "title": "Round",
         "description": "The number of decimals to round to on a continuous float column.",
         "type": "integer"
      }
   },
   "required": [
      "name",
      "dtype",
      "sql_type",
      "feature_type"
   ]
}

Fields:
field drift: bool | None = True

If true (the default), the column is enabled for drift calculations.

field dtype: str [Required]

Data type of column. For example, float64.

field feature_id: int | None = None

Id of the feature, generated by the platform for optimization.

field feature_type: str [Required]

Feature type of column. Acceptable values include categorical and continuous.

field hotspot: bool | None = False

If true (the default), the column is enabled for hotspot analysis.

field name: str [Required]

Name of column.

field rca: List[str] | None = []

List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.

field round: int | None = None

The number of decimals to round to on a continuous float column.

field segmentation: bool | None = True

If true (the default), the column is enabled for segmentation calculations.

field sql_type: str [Required]

SQL data type of column. For example, Float32.

pydantic model V1InferenceMappingJob

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceMappingJob",
   "type": "object",
   "properties": {
      "deployment": {
         "title": "Deployment",
         "description": "Deployment name.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Model name. Default value is deployment name.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version. Default value is `1`.",
         "default": "1",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage. Default value is `primary`.",
         "default": "primary",
         "type": "string"
      },
      "connection": {
         "title": "Connection",
         "description": "Database connection.",
         "type": "string"
      },
      "srcurl": {
         "title": "Srcurl",
         "description": "Source url corresponding to location of data.",
         "type": "string"
      },
      "df_schema": {
         "title": "Df Schema",
         "description": "Dataframe schema.",
         "allOf": [
            {
               "$ref": "#/definitions/V1InferenceMappingSchema"
            }
         ]
      },
      "training_table": {
         "title": "Training Table",
         "description": "Training table name that needs to be specified for training data preprocessing.",
         "type": "string"
      }
   },
   "required": [
      "deployment",
      "model_name",
      "connection",
      "df_schema"
   ],
   "definitions": {
      "V1InferenceMappingColumnSchema": {
         "title": "V1InferenceMappingColumnSchema",
         "type": "object",
         "properties": {
            "feature_id": {
               "title": "Feature Id",
               "description": "Id of the feature, generated by the platform for optimization.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of column.",
               "type": "string"
            },
            "dtype": {
               "title": "Dtype",
               "description": "Data type of column. For example, `float64`.",
               "type": "string"
            },
            "sql_type": {
               "title": "Sql Type",
               "description": "SQL data type of column. For example, `Float32`.",
               "type": "string"
            },
            "feature_type": {
               "title": "Feature Type",
               "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
               "type": "string"
            },
            "segmentation": {
               "title": "Segmentation",
               "description": "If true (the default), the column is enabled for segmentation calculations.",
               "default": true,
               "type": "boolean"
            },
            "drift": {
               "title": "Drift",
               "description": "If true (the default), the column is enabled for drift calculations.",
               "default": true,
               "type": "boolean"
            },
            "hotspot": {
               "title": "Hotspot",
               "description": "If true (the default), the column is enabled for hotspot analysis.",
               "default": false,
               "type": "boolean"
            },
            "rca": {
               "title": "Rca",
               "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "round": {
               "title": "Round",
               "description": "The number of decimals to round to on a continuous float column.",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "dtype",
            "sql_type",
            "feature_type"
         ]
      },
      "V1InferenceMappingSchema": {
         "title": "V1InferenceMappingSchema",
         "type": "object",
         "properties": {
            "target_col": {
               "title": "Target Col",
               "description": "Name of target column.",
               "type": "string"
            },
            "identifier_cols": {
               "title": "Identifier Cols",
               "description": "List of identifier columns.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "columns": {
               "title": "Columns",
               "description": "List of all columns.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1InferenceMappingColumnSchema"
               }
            },
            "datetime_col": {
               "title": "Datetime Col",
               "description": "Name of datetime column",
               "default": "",
               "type": "string"
            },
            "predict_proba_col": {
               "title": "Predict Proba Col",
               "description": "(Classification models only) Name of column that provides the predict probability.",
               "type": "string"
            }
         },
         "required": [
            "target_col",
            "columns"
         ]
      }
   }
}

Fields:
Validators:
field connection: str [Required]

Database connection.

field deployment: str [Required]

Deployment name.

field df_schema: V1InferenceMappingSchema [Required]

Dataframe schema.

field model_name: str [Required]

Model name. Default value is deployment name.

Validated by:
field model_stage: str = 'primary'

Model stage. Default value is primary.

field model_version: str = '1'

Model version. Default value is 1.

field srcurl: str | None = None

Source url corresponding to location of data.

field training_table: str | None = None

Training table name that needs to be specified for training data preprocessing.

validator grouped_filters_validator  »  model_name
pydantic model V1InferenceMappingModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceMappingModel",
   "type": "object",
   "properties": {
      "index": {
         "title": "Index",
         "description": "Index identifier.",
         "type": "integer"
      },
      "deployment": {
         "title": "Deployment",
         "description": "Deployment name for the related model.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Model name for the related model.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version for the related model, e.g., 1.",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage for the related model, e.g., primary.",
         "type": "string"
      },
      "connection": {
         "title": "Connection",
         "description": "Database connection for the inference mapping.",
         "type": "string"
      },
      "df_schema": {
         "title": "Df Schema",
         "description": "Dictionary containing dataframe schema for model, i.e., target column, identifier column(s), all columns, datetime column, and predict probability column (classification models only).",
         "allOf": [
            {
               "$ref": "#/definitions/V1InferenceMappingSchema"
            }
         ]
      },
      "identifier_cols_schema": {
         "title": "Identifier Cols Schema",
         "description": "List containing identifier columns schema for model."
      },
      "inference_table": {
         "title": "Inference Table",
         "description": "Name of inference table for mapping.",
         "type": "string"
      },
      "ground_truth_table": {
         "title": "Ground Truth Table",
         "description": "Name of ground truth table for mapping.",
         "type": "string"
      },
      "joined_table": {
         "title": "Joined Table",
         "description": "Name of joined table for mapping.",
         "type": "string"
      },
      "key_table": {
         "title": "Key Table",
         "description": "Name of key table for mapping.",
         "type": "string"
      },
      "create_ddl": {
         "title": "Create Ddl",
         "description": "The query to create the ddl tables.",
         "type": "string"
      },
      "postprocessors": {
         "title": "Postprocessors",
         "description": "One or more postprocessor (and related params) to include in inference mapping, to transform output data before sending to backend database. The available postprocessors include `PickHighestProbability`, `PickInferenceMapper`, and `PickProbablityThreshold`. For each postprocessor, specify the classname, method, and initparams.",
         "default": [],
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "training_set_id": {
         "title": "Training Set Id",
         "description": "Training set id that needs to be specified for training data preprocessing.",
         "type": "integer"
      },
      "training_table": {
         "title": "Training Table",
         "description": "Training table name that needs to be specified for training data preprocessing.",
         "type": "string"
      }
   },
   "required": [
      "deployment",
      "model_name",
      "model_version",
      "model_stage",
      "connection",
      "df_schema"
   ],
   "example": {
      "index": 7,
      "deployment": "vianai.jt_placeholder_deployment",
      "model_name": "vianai.jt_placeholder_deployment",
      "model_version": "1",
      "model_stage": "primary",
      "connection": "Internal clickhouse DB",
      "df_schema": {
         "target_col": "total_amount",
         "identifier_cols": [
            "pk"
         ],
         "columns": [
            {
               "name": "PULocationID",
               "dtype": "float64",
               "sql_type": "Float32",
               "feature_type": "categorical",
               "feature_id": 1,
               "drift": true,
               "segmentation": true
            },
            {
               "name": "DOLocationID",
               "dtype": "float64",
               "sql_type": "Float32",
               "feature_type": "categorical",
               "feature_id": 2,
               "drift": true,
               "segmentation": true
            },
            {
               "name": "trip_distance",
               "dtype": "float64",
               "sql_type": "Float32",
               "feature_type": "continuous",
               "feature_id": 3,
               "drift": true,
               "segmentation": true
            },
            {
               "name": "travel_time",
               "dtype": "float64",
               "sql_type": "Float32",
               "feature_type": "continuous",
               "feature_id": 4,
               "drift": true,
               "segmentation": true
            },
            {
               "name": "PUdatetime",
               "dtype": "datetime64[ns]",
               "sql_type": "",
               "feature_type": "unknown",
               "feature_id": 5,
               "drift": false
            }
         ],
         "datetime_col": "PUdatetime"
      },
      "identifier_cols_schema": null,
      "inference_table": "16794179557100_dit",
      "ground_truth_table": "16794179557100_gt",
      "joined_table": "16794179557100_joined",
      "key_table": "16794179557100_key",
      "create_ddl": null,
      "postprocessors": [
         {
            "classname": "vianai.postprocessing.classification.PickInferenceMapper",
            "method": "fit_transform",
            "initparams": {
               "mapper": "{1:'a',2:'b',3:'c'}"
            }
         }
      ]
   },
   "definitions": {
      "V1InferenceMappingColumnSchema": {
         "title": "V1InferenceMappingColumnSchema",
         "type": "object",
         "properties": {
            "feature_id": {
               "title": "Feature Id",
               "description": "Id of the feature, generated by the platform for optimization.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of column.",
               "type": "string"
            },
            "dtype": {
               "title": "Dtype",
               "description": "Data type of column. For example, `float64`.",
               "type": "string"
            },
            "sql_type": {
               "title": "Sql Type",
               "description": "SQL data type of column. For example, `Float32`.",
               "type": "string"
            },
            "feature_type": {
               "title": "Feature Type",
               "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
               "type": "string"
            },
            "segmentation": {
               "title": "Segmentation",
               "description": "If true (the default), the column is enabled for segmentation calculations.",
               "default": true,
               "type": "boolean"
            },
            "drift": {
               "title": "Drift",
               "description": "If true (the default), the column is enabled for drift calculations.",
               "default": true,
               "type": "boolean"
            },
            "hotspot": {
               "title": "Hotspot",
               "description": "If true (the default), the column is enabled for hotspot analysis.",
               "default": false,
               "type": "boolean"
            },
            "rca": {
               "title": "Rca",
               "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "round": {
               "title": "Round",
               "description": "The number of decimals to round to on a continuous float column.",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "dtype",
            "sql_type",
            "feature_type"
         ]
      },
      "V1InferenceMappingSchema": {
         "title": "V1InferenceMappingSchema",
         "type": "object",
         "properties": {
            "target_col": {
               "title": "Target Col",
               "description": "Name of target column.",
               "type": "string"
            },
            "identifier_cols": {
               "title": "Identifier Cols",
               "description": "List of identifier columns.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "columns": {
               "title": "Columns",
               "description": "List of all columns.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1InferenceMappingColumnSchema"
               }
            },
            "datetime_col": {
               "title": "Datetime Col",
               "description": "Name of datetime column",
               "default": "",
               "type": "string"
            },
            "predict_proba_col": {
               "title": "Predict Proba Col",
               "description": "(Classification models only) Name of column that provides the predict probability.",
               "type": "string"
            }
         },
         "required": [
            "target_col",
            "columns"
         ]
      }
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘index’: 7, ‘deployment’: ‘vianai.jt_placeholder_deployment’, ‘model_name’: ‘vianai.jt_placeholder_deployment’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘connection’: ‘Internal clickhouse DB’, ‘df_schema’: {‘target_col’: ‘total_amount’, ‘identifier_cols’: [‘pk’], ‘columns’: [{‘name’: ‘PULocationID’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘categorical’, ‘feature_id’: 1, ‘drift’: True, ‘segmentation’: True}, {‘name’: ‘DOLocationID’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘categorical’, ‘feature_id’: 2, ‘drift’: True, ‘segmentation’: True}, {‘name’: ‘trip_distance’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘feature_id’: 3, ‘drift’: True, ‘segmentation’: True}, {‘name’: ‘travel_time’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘feature_id’: 4, ‘drift’: True, ‘segmentation’: True}, {‘name’: ‘PUdatetime’, ‘dtype’: ‘datetime64[ns]’, ‘sql_type’: ‘’, ‘feature_type’: ‘unknown’, ‘feature_id’: 5, ‘drift’: False}], ‘datetime_col’: ‘PUdatetime’}, ‘identifier_cols_schema’: None, ‘inference_table’: ‘16794179557100_dit’, ‘ground_truth_table’: ‘16794179557100_gt’, ‘joined_table’: ‘16794179557100_joined’, ‘key_table’: ‘16794179557100_key’, ‘create_ddl’: None, ‘postprocessors’: [{‘classname’: ‘vianai.postprocessing.classification.PickInferenceMapper’, ‘method’: ‘fit_transform’, ‘initparams’: {‘mapper’: “{1:’a’,2:’b’,3:’c’}”}}]}}

Fields:
field connection: str [Required]

Database connection for the inference mapping.

field create_ddl: str | None = None

The query to create the ddl tables.

field deployment: str [Required]

Deployment name for the related model.

field df_schema: V1InferenceMappingSchema [Required]

Dictionary containing dataframe schema for model, i.e., target column, identifier column(s), all columns, datetime column, and predict probability column (classification models only).

field ground_truth_table: str | None = None

Name of ground truth table for mapping.

field identifier_cols_schema: Any | None = None

List containing identifier columns schema for model.

field index: int | None = None

Index identifier.

field inference_table: str | None = None

Name of inference table for mapping.

field joined_table: str | None = None

Name of joined table for mapping.

field key_table: str | None = None

Name of key table for mapping.

field model_name: str [Required]

Model name for the related model.

field model_stage: str [Required]

Model stage for the related model, e.g., primary.

field model_version: str [Required]

Model version for the related model, e.g., 1.

field postprocessors: List[dict] | None = []

One or more postprocessor (and related params) to include in inference mapping, to transform output data before sending to backend database. The available postprocessors include PickHighestProbability, PickInferenceMapper, and PickProbablityThreshold. For each postprocessor, specify the classname, method, and initparams.

field training_set_id: int | None = None

Training set id that needs to be specified for training data preprocessing.

field training_table: str | None = None

Training table name that needs to be specified for training data preprocessing.

pydantic model V1InferenceMappingModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceMappingModelList",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1InferenceMappingModel"
   },
   "definitions": {
      "V1InferenceMappingColumnSchema": {
         "title": "V1InferenceMappingColumnSchema",
         "type": "object",
         "properties": {
            "feature_id": {
               "title": "Feature Id",
               "description": "Id of the feature, generated by the platform for optimization.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of column.",
               "type": "string"
            },
            "dtype": {
               "title": "Dtype",
               "description": "Data type of column. For example, `float64`.",
               "type": "string"
            },
            "sql_type": {
               "title": "Sql Type",
               "description": "SQL data type of column. For example, `Float32`.",
               "type": "string"
            },
            "feature_type": {
               "title": "Feature Type",
               "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
               "type": "string"
            },
            "segmentation": {
               "title": "Segmentation",
               "description": "If true (the default), the column is enabled for segmentation calculations.",
               "default": true,
               "type": "boolean"
            },
            "drift": {
               "title": "Drift",
               "description": "If true (the default), the column is enabled for drift calculations.",
               "default": true,
               "type": "boolean"
            },
            "hotspot": {
               "title": "Hotspot",
               "description": "If true (the default), the column is enabled for hotspot analysis.",
               "default": false,
               "type": "boolean"
            },
            "rca": {
               "title": "Rca",
               "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "round": {
               "title": "Round",
               "description": "The number of decimals to round to on a continuous float column.",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "dtype",
            "sql_type",
            "feature_type"
         ]
      },
      "V1InferenceMappingSchema": {
         "title": "V1InferenceMappingSchema",
         "type": "object",
         "properties": {
            "target_col": {
               "title": "Target Col",
               "description": "Name of target column.",
               "type": "string"
            },
            "identifier_cols": {
               "title": "Identifier Cols",
               "description": "List of identifier columns.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "columns": {
               "title": "Columns",
               "description": "List of all columns.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1InferenceMappingColumnSchema"
               }
            },
            "datetime_col": {
               "title": "Datetime Col",
               "description": "Name of datetime column",
               "default": "",
               "type": "string"
            },
            "predict_proba_col": {
               "title": "Predict Proba Col",
               "description": "(Classification models only) Name of column that provides the predict probability.",
               "type": "string"
            }
         },
         "required": [
            "target_col",
            "columns"
         ]
      },
      "V1InferenceMappingModel": {
         "title": "V1InferenceMappingModel",
         "type": "object",
         "properties": {
            "index": {
               "title": "Index",
               "description": "Index identifier.",
               "type": "integer"
            },
            "deployment": {
               "title": "Deployment",
               "description": "Deployment name for the related model.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Model name for the related model.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version for the related model, e.g., 1.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage for the related model, e.g., primary.",
               "type": "string"
            },
            "connection": {
               "title": "Connection",
               "description": "Database connection for the inference mapping.",
               "type": "string"
            },
            "df_schema": {
               "title": "Df Schema",
               "description": "Dictionary containing dataframe schema for model, i.e., target column, identifier column(s), all columns, datetime column, and predict probability column (classification models only).",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1InferenceMappingSchema"
                  }
               ]
            },
            "identifier_cols_schema": {
               "title": "Identifier Cols Schema",
               "description": "List containing identifier columns schema for model."
            },
            "inference_table": {
               "title": "Inference Table",
               "description": "Name of inference table for mapping.",
               "type": "string"
            },
            "ground_truth_table": {
               "title": "Ground Truth Table",
               "description": "Name of ground truth table for mapping.",
               "type": "string"
            },
            "joined_table": {
               "title": "Joined Table",
               "description": "Name of joined table for mapping.",
               "type": "string"
            },
            "key_table": {
               "title": "Key Table",
               "description": "Name of key table for mapping.",
               "type": "string"
            },
            "create_ddl": {
               "title": "Create Ddl",
               "description": "The query to create the ddl tables.",
               "type": "string"
            },
            "postprocessors": {
               "title": "Postprocessors",
               "description": "One or more postprocessor (and related params) to include in inference mapping, to transform output data before sending to backend database. The available postprocessors include `PickHighestProbability`, `PickInferenceMapper`, and `PickProbablityThreshold`. For each postprocessor, specify the classname, method, and initparams.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            "training_set_id": {
               "title": "Training Set Id",
               "description": "Training set id that needs to be specified for training data preprocessing.",
               "type": "integer"
            },
            "training_table": {
               "title": "Training Table",
               "description": "Training table name that needs to be specified for training data preprocessing.",
               "type": "string"
            }
         },
         "required": [
            "deployment",
            "model_name",
            "model_version",
            "model_stage",
            "connection",
            "df_schema"
         ],
         "example": {
            "index": 7,
            "deployment": "vianai.jt_placeholder_deployment",
            "model_name": "vianai.jt_placeholder_deployment",
            "model_version": "1",
            "model_stage": "primary",
            "connection": "Internal clickhouse DB",
            "df_schema": {
               "target_col": "total_amount",
               "identifier_cols": [
                  "pk"
               ],
               "columns": [
                  {
                     "name": "PULocationID",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "categorical",
                     "feature_id": 1,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "DOLocationID",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "categorical",
                     "feature_id": 2,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "trip_distance",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "continuous",
                     "feature_id": 3,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "travel_time",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "continuous",
                     "feature_id": 4,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "PUdatetime",
                     "dtype": "datetime64[ns]",
                     "sql_type": "",
                     "feature_type": "unknown",
                     "feature_id": 5,
                     "drift": false
                  }
               ],
               "datetime_col": "PUdatetime"
            },
            "identifier_cols_schema": null,
            "inference_table": "16794179557100_dit",
            "ground_truth_table": "16794179557100_gt",
            "joined_table": "16794179557100_joined",
            "key_table": "16794179557100_key",
            "create_ddl": null,
            "postprocessors": [
               {
                  "classname": "vianai.postprocessing.classification.PickInferenceMapper",
                  "method": "fit_transform",
                  "initparams": {
                     "mapper": "{1:'a',2:'b',3:'c'}"
                  }
               }
            ]
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.inferencestore.inference_mapping.V1InferenceMappingModel])

pydantic model V1InferenceMappingModelsPage

Bases: V1PageModel

Show JSON schema
{
   "title": "V1InferenceMappingModelsPage",
   "type": "object",
   "properties": {
      "items": {
         "title": "Items",
         "description": "Inference Mappings returned by search in page.",
         "default": [],
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1InferenceMappingModel"
         }
      },
      "current_page": {
         "title": "Current Page",
         "description": "Current page of items.",
         "default": 0,
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items on a page.",
         "default": 0,
         "type": "integer"
      },
      "previous_page": {
         "title": "Previous Page",
         "description": "Number of the previous page.",
         "type": "integer"
      },
      "next_page": {
         "title": "Next Page",
         "description": "Number of the next page.",
         "type": "integer"
      },
      "has_previous": {
         "title": "Has Previous",
         "description": "Whether or not there is a previous page.",
         "default": false,
         "type": "boolean"
      },
      "previous_items": {
         "title": "Previous Items",
         "default": 0,
         "type": "integer"
      },
      "has_next": {
         "title": "Has Next",
         "description": "Whether or not there is a next page.",
         "default": false,
         "type": "boolean"
      },
      "total": {
         "title": "Total",
         "description": "Total number of items returned by search over all pages.",
         "default": 0,
         "type": "integer"
      },
      "pages": {
         "title": "Pages",
         "description": "Total number of pages returned by search.",
         "default": 0,
         "type": "integer"
      }
   },
   "example": "{\"items\": [{\"index\": 1, \"deployment\": \"Credit Card Fraud vianai S\", \"model_name\": \"Credit Card Fraud vianai S\", \"model_version\": \"1\", \"model_stage\": \"primary\", \"connection\": \"clickhouse://default:@clickhouse/default\", \"df_schema\": {\"target_col\": \"tx_fraud\", \"identifier_cols\": [\"tx_id\"], \"columns\": [{\"feature_id\": 1, \"name\": \"tx_datetime\", \"dtype\": \"datetime\", \"sql_type\": \"\", \"feature_type\": \"unknown\", \"segmentation\": false, \"drift\": false, \"hotspot\": false, \"rca\": [], \"round\": null}, {\"feature_id\": 2, \"name\": \"predict_proba\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 3, \"name\": \"customer_id\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 4, \"name\": \"terminal_id\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 5, \"name\": \"tx_amount\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 6, \"name\": \"tx_fraud_scenario\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 7, \"name\": \"tx_during_weekend\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 8, \"name\": \"tx_during_night\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 9, \"name\": \"customer_id_nb_tx_1day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 10, \"name\": \"customer_id_avg_amount_1day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 11, \"name\": \"customer_id_nb_tx_7day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 12, \"name\": \"customer_id_avg_amount_7day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 13, \"name\": \"customer_id_nb_tx_30day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 14, \"name\": \"customer_id_avg_amount_30day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 15, \"name\": \"terminal_id_nb_tx_1day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 16, \"name\": \"terminal_id_risk_1day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 17, \"name\": \"terminal_id_nb_tx_7day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 18, \"name\": \"terminal_id_risk_7day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 19, \"name\": \"terminal_id_nb_tx_30day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 20, \"name\": \"terminal_id_risk_30day_window\", \"dtype\": \"float64\", \"sql_type\": \"Float32\", \"feature_type\": \"continuous\", \"segmentation\": true, \"drift\": true, \"hotspot\": false, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 21, \"name\": \"tx_id\", \"dtype\": \"object\", \"sql_type\": \"String\", \"feature_type\": \"categorical\", \"segmentation\": true, \"drift\": true, \"hotspot\": true, \"rca\": [\"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 22, \"name\": \"transaction_cat\", \"dtype\": \"object\", \"sql_type\": \"String\", \"feature_type\": \"categorical\", \"segmentation\": true, \"drift\": true, \"hotspot\": true, \"rca\": [\"tx_id\", \"transaction_subcat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 23, \"name\": \"transaction_subcat\", \"dtype\": \"object\", \"sql_type\": \"String\", \"feature_type\": \"categorical\", \"segmentation\": true, \"drift\": true, \"hotspot\": true, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subsubcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 24, \"name\": \"transaction_subsubcat\", \"dtype\": \"object\", \"sql_type\": \"String\", \"feature_type\": \"categorical\", \"segmentation\": true, \"drift\": true, \"hotspot\": true, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"tx_fraud\"], \"round\": null}, {\"feature_id\": 25, \"name\": \"tx_fraud\", \"dtype\": \"bool\", \"sql_type\": \"Boolean\", \"feature_type\": \"categorical\", \"segmentation\": true, \"drift\": true, \"hotspot\": true, \"rca\": [\"tx_id\", \"transaction_cat\", \"transaction_subcat\", \"transaction_subsubcat\"], \"round\": null}], \"datetime_col\": \"tx_datetime\", \"predict_proba_col\": \"predict_proba\"}, \"identifier_cols_schema\": null, \"inference_table\": null, \"ground_truth_table\": null, \"joined_table\": null, \"key_table\": null, \"create_ddl\": null, \"postprocessors\": []}], \"current_page\": 1, \"page_size\": 100, \"previous_page\": null, \"next_page\": null, \"has_previous\": false, \"previous_items\": 0, \"has_next\": false, \"total\": 1, \"pages\": 1}",
   "definitions": {
      "V1InferenceMappingColumnSchema": {
         "title": "V1InferenceMappingColumnSchema",
         "type": "object",
         "properties": {
            "feature_id": {
               "title": "Feature Id",
               "description": "Id of the feature, generated by the platform for optimization.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of column.",
               "type": "string"
            },
            "dtype": {
               "title": "Dtype",
               "description": "Data type of column. For example, `float64`.",
               "type": "string"
            },
            "sql_type": {
               "title": "Sql Type",
               "description": "SQL data type of column. For example, `Float32`.",
               "type": "string"
            },
            "feature_type": {
               "title": "Feature Type",
               "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
               "type": "string"
            },
            "segmentation": {
               "title": "Segmentation",
               "description": "If true (the default), the column is enabled for segmentation calculations.",
               "default": true,
               "type": "boolean"
            },
            "drift": {
               "title": "Drift",
               "description": "If true (the default), the column is enabled for drift calculations.",
               "default": true,
               "type": "boolean"
            },
            "hotspot": {
               "title": "Hotspot",
               "description": "If true (the default), the column is enabled for hotspot analysis.",
               "default": false,
               "type": "boolean"
            },
            "rca": {
               "title": "Rca",
               "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "round": {
               "title": "Round",
               "description": "The number of decimals to round to on a continuous float column.",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "dtype",
            "sql_type",
            "feature_type"
         ]
      },
      "V1InferenceMappingSchema": {
         "title": "V1InferenceMappingSchema",
         "type": "object",
         "properties": {
            "target_col": {
               "title": "Target Col",
               "description": "Name of target column.",
               "type": "string"
            },
            "identifier_cols": {
               "title": "Identifier Cols",
               "description": "List of identifier columns.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "columns": {
               "title": "Columns",
               "description": "List of all columns.",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/V1InferenceMappingColumnSchema"
               }
            },
            "datetime_col": {
               "title": "Datetime Col",
               "description": "Name of datetime column",
               "default": "",
               "type": "string"
            },
            "predict_proba_col": {
               "title": "Predict Proba Col",
               "description": "(Classification models only) Name of column that provides the predict probability.",
               "type": "string"
            }
         },
         "required": [
            "target_col",
            "columns"
         ]
      },
      "V1InferenceMappingModel": {
         "title": "V1InferenceMappingModel",
         "type": "object",
         "properties": {
            "index": {
               "title": "Index",
               "description": "Index identifier.",
               "type": "integer"
            },
            "deployment": {
               "title": "Deployment",
               "description": "Deployment name for the related model.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Model name for the related model.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version for the related model, e.g., 1.",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage for the related model, e.g., primary.",
               "type": "string"
            },
            "connection": {
               "title": "Connection",
               "description": "Database connection for the inference mapping.",
               "type": "string"
            },
            "df_schema": {
               "title": "Df Schema",
               "description": "Dictionary containing dataframe schema for model, i.e., target column, identifier column(s), all columns, datetime column, and predict probability column (classification models only).",
               "allOf": [
                  {
                     "$ref": "#/definitions/V1InferenceMappingSchema"
                  }
               ]
            },
            "identifier_cols_schema": {
               "title": "Identifier Cols Schema",
               "description": "List containing identifier columns schema for model."
            },
            "inference_table": {
               "title": "Inference Table",
               "description": "Name of inference table for mapping.",
               "type": "string"
            },
            "ground_truth_table": {
               "title": "Ground Truth Table",
               "description": "Name of ground truth table for mapping.",
               "type": "string"
            },
            "joined_table": {
               "title": "Joined Table",
               "description": "Name of joined table for mapping.",
               "type": "string"
            },
            "key_table": {
               "title": "Key Table",
               "description": "Name of key table for mapping.",
               "type": "string"
            },
            "create_ddl": {
               "title": "Create Ddl",
               "description": "The query to create the ddl tables.",
               "type": "string"
            },
            "postprocessors": {
               "title": "Postprocessors",
               "description": "One or more postprocessor (and related params) to include in inference mapping, to transform output data before sending to backend database. The available postprocessors include `PickHighestProbability`, `PickInferenceMapper`, and `PickProbablityThreshold`. For each postprocessor, specify the classname, method, and initparams.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            "training_set_id": {
               "title": "Training Set Id",
               "description": "Training set id that needs to be specified for training data preprocessing.",
               "type": "integer"
            },
            "training_table": {
               "title": "Training Table",
               "description": "Training table name that needs to be specified for training data preprocessing.",
               "type": "string"
            }
         },
         "required": [
            "deployment",
            "model_name",
            "model_version",
            "model_stage",
            "connection",
            "df_schema"
         ],
         "example": {
            "index": 7,
            "deployment": "vianai.jt_placeholder_deployment",
            "model_name": "vianai.jt_placeholder_deployment",
            "model_version": "1",
            "model_stage": "primary",
            "connection": "Internal clickhouse DB",
            "df_schema": {
               "target_col": "total_amount",
               "identifier_cols": [
                  "pk"
               ],
               "columns": [
                  {
                     "name": "PULocationID",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "categorical",
                     "feature_id": 1,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "DOLocationID",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "categorical",
                     "feature_id": 2,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "trip_distance",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "continuous",
                     "feature_id": 3,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "travel_time",
                     "dtype": "float64",
                     "sql_type": "Float32",
                     "feature_type": "continuous",
                     "feature_id": 4,
                     "drift": true,
                     "segmentation": true
                  },
                  {
                     "name": "PUdatetime",
                     "dtype": "datetime64[ns]",
                     "sql_type": "",
                     "feature_type": "unknown",
                     "feature_id": 5,
                     "drift": false
                  }
               ],
               "datetime_col": "PUdatetime"
            },
            "identifier_cols_schema": null,
            "inference_table": "16794179557100_dit",
            "ground_truth_table": "16794179557100_gt",
            "joined_table": "16794179557100_joined",
            "key_table": "16794179557100_key",
            "create_ddl": null,
            "postprocessors": [
               {
                  "classname": "vianai.postprocessing.classification.PickInferenceMapper",
                  "method": "fit_transform",
                  "initparams": {
                     "mapper": "{1:'a',2:'b',3:'c'}"
                  }
               }
            ]
         }
      }
   }
}

Config:
  • dict_config: dict = {‘items’: [{‘index’: 1, ‘deployment’: ‘Credit Card Fraud vianai S’, ‘model_name’: ‘Credit Card Fraud vianai S’, ‘model_version’: ‘1’, ‘model_stage’: ‘primary’, ‘connection’: ‘clickhouse://default:@clickhouse/default’, ‘df_schema’: {‘target_col’: ‘tx_fraud’, ‘identifier_cols’: [‘tx_id’], ‘columns’: [{‘feature_id’: 1, ‘name’: ‘tx_datetime’, ‘dtype’: ‘datetime’, ‘sql_type’: ‘’, ‘feature_type’: ‘unknown’, ‘segmentation’: False, ‘drift’: False, ‘hotspot’: False, ‘rca’: [], ‘round’: None}, {‘feature_id’: 2, ‘name’: ‘predict_proba’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 3, ‘name’: ‘customer_id’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 4, ‘name’: ‘terminal_id’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 5, ‘name’: ‘tx_amount’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 6, ‘name’: ‘tx_fraud_scenario’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 7, ‘name’: ‘tx_during_weekend’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 8, ‘name’: ‘tx_during_night’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 9, ‘name’: ‘customer_id_nb_tx_1day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 10, ‘name’: ‘customer_id_avg_amount_1day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 11, ‘name’: ‘customer_id_nb_tx_7day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 12, ‘name’: ‘customer_id_avg_amount_7day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 13, ‘name’: ‘customer_id_nb_tx_30day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 14, ‘name’: ‘customer_id_avg_amount_30day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 15, ‘name’: ‘terminal_id_nb_tx_1day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 16, ‘name’: ‘terminal_id_risk_1day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 17, ‘name’: ‘terminal_id_nb_tx_7day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 18, ‘name’: ‘terminal_id_risk_7day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 19, ‘name’: ‘terminal_id_nb_tx_30day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 20, ‘name’: ‘terminal_id_risk_30day_window’, ‘dtype’: ‘float64’, ‘sql_type’: ‘Float32’, ‘feature_type’: ‘continuous’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: False, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 21, ‘name’: ‘tx_id’, ‘dtype’: ‘object’, ‘sql_type’: ‘String’, ‘feature_type’: ‘categorical’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: True, ‘rca’: [‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 22, ‘name’: ‘transaction_cat’, ‘dtype’: ‘object’, ‘sql_type’: ‘String’, ‘feature_type’: ‘categorical’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: True, ‘rca’: [‘tx_id’, ‘transaction_subcat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 23, ‘name’: ‘transaction_subcat’, ‘dtype’: ‘object’, ‘sql_type’: ‘String’, ‘feature_type’: ‘categorical’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: True, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subsubcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 24, ‘name’: ‘transaction_subsubcat’, ‘dtype’: ‘object’, ‘sql_type’: ‘String’, ‘feature_type’: ‘categorical’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: True, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘tx_fraud’], ‘round’: None}, {‘feature_id’: 25, ‘name’: ‘tx_fraud’, ‘dtype’: ‘bool’, ‘sql_type’: ‘Boolean’, ‘feature_type’: ‘categorical’, ‘segmentation’: True, ‘drift’: True, ‘hotspot’: True, ‘rca’: [‘tx_id’, ‘transaction_cat’, ‘transaction_subcat’, ‘transaction_subsubcat’], ‘round’: None}], ‘datetime_col’: ‘tx_datetime’, ‘predict_proba_col’: ‘predict_proba’}, ‘identifier_cols_schema’: None, ‘inference_table’: None, ‘ground_truth_table’: None, ‘joined_table’: None, ‘key_table’: None, ‘create_ddl’: None, ‘postprocessors’: []}], ‘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}

  • schema_extra: dict = {‘example’: ‘{“items”: [{“index”: 1, “deployment”: “Credit Card Fraud vianai S”, “model_name”: “Credit Card Fraud vianai S”, “model_version”: “1”, “model_stage”: “primary”, “connection”: “clickhouse://default:@clickhouse/default”, “df_schema”: {“target_col”: “tx_fraud”, “identifier_cols”: [“tx_id”], “columns”: [{“feature_id”: 1, “name”: “tx_datetime”, “dtype”: “datetime”, “sql_type”: “”, “feature_type”: “unknown”, “segmentation”: false, “drift”: false, “hotspot”: false, “rca”: [], “round”: null}, {“feature_id”: 2, “name”: “predict_proba”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 3, “name”: “customer_id”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 4, “name”: “terminal_id”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 5, “name”: “tx_amount”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 6, “name”: “tx_fraud_scenario”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 7, “name”: “tx_during_weekend”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 8, “name”: “tx_during_night”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 9, “name”: “customer_id_nb_tx_1day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 10, “name”: “customer_id_avg_amount_1day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 11, “name”: “customer_id_nb_tx_7day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 12, “name”: “customer_id_avg_amount_7day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 13, “name”: “customer_id_nb_tx_30day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 14, “name”: “customer_id_avg_amount_30day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 15, “name”: “terminal_id_nb_tx_1day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 16, “name”: “terminal_id_risk_1day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 17, “name”: “terminal_id_nb_tx_7day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 18, “name”: “terminal_id_risk_7day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 19, “name”: “terminal_id_nb_tx_30day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 20, “name”: “terminal_id_risk_30day_window”, “dtype”: “float64”, “sql_type”: “Float32”, “feature_type”: “continuous”, “segmentation”: true, “drift”: true, “hotspot”: false, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 21, “name”: “tx_id”, “dtype”: “object”, “sql_type”: “String”, “feature_type”: “categorical”, “segmentation”: true, “drift”: true, “hotspot”: true, “rca”: [“transaction_cat”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 22, “name”: “transaction_cat”, “dtype”: “object”, “sql_type”: “String”, “feature_type”: “categorical”, “segmentation”: true, “drift”: true, “hotspot”: true, “rca”: [“tx_id”, “transaction_subcat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 23, “name”: “transaction_subcat”, “dtype”: “object”, “sql_type”: “String”, “feature_type”: “categorical”, “segmentation”: true, “drift”: true, “hotspot”: true, “rca”: [“tx_id”, “transaction_cat”, “transaction_subsubcat”, “tx_fraud”], “round”: null}, {“feature_id”: 24, “name”: “transaction_subsubcat”, “dtype”: “object”, “sql_type”: “String”, “feature_type”: “categorical”, “segmentation”: true, “drift”: true, “hotspot”: true, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “tx_fraud”], “round”: null}, {“feature_id”: 25, “name”: “tx_fraud”, “dtype”: “bool”, “sql_type”: “Boolean”, “feature_type”: “categorical”, “segmentation”: true, “drift”: true, “hotspot”: true, “rca”: [“tx_id”, “transaction_cat”, “transaction_subcat”, “transaction_subsubcat”], “round”: null}], “datetime_col”: “tx_datetime”, “predict_proba_col”: “predict_proba”}, “identifier_cols_schema”: null, “inference_table”: null, “ground_truth_table”: null, “joined_table”: null, “key_table”: null, “create_ddl”: null, “postprocessors”: []}], “current_page”: 1, “page_size”: 100, “previous_page”: null, “next_page”: null, “has_previous”: false, “previous_items”: 0, “has_next”: false, “total”: 1, “pages”: 1}’}

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

Inference Mappings returned by search in page.

pydantic model V1InferenceMappingSchema

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceMappingSchema",
   "type": "object",
   "properties": {
      "target_col": {
         "title": "Target Col",
         "description": "Name of target column.",
         "type": "string"
      },
      "identifier_cols": {
         "title": "Identifier Cols",
         "description": "List of identifier columns.",
         "default": [],
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "columns": {
         "title": "Columns",
         "description": "List of all columns.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1InferenceMappingColumnSchema"
         }
      },
      "datetime_col": {
         "title": "Datetime Col",
         "description": "Name of datetime column",
         "default": "",
         "type": "string"
      },
      "predict_proba_col": {
         "title": "Predict Proba Col",
         "description": "(Classification models only) Name of column that provides the predict probability.",
         "type": "string"
      }
   },
   "required": [
      "target_col",
      "columns"
   ],
   "definitions": {
      "V1InferenceMappingColumnSchema": {
         "title": "V1InferenceMappingColumnSchema",
         "type": "object",
         "properties": {
            "feature_id": {
               "title": "Feature Id",
               "description": "Id of the feature, generated by the platform for optimization.",
               "type": "integer"
            },
            "name": {
               "title": "Name",
               "description": "Name of column.",
               "type": "string"
            },
            "dtype": {
               "title": "Dtype",
               "description": "Data type of column. For example, `float64`.",
               "type": "string"
            },
            "sql_type": {
               "title": "Sql Type",
               "description": "SQL data type of column. For example, `Float32`.",
               "type": "string"
            },
            "feature_type": {
               "title": "Feature Type",
               "description": "Feature type of column. Acceptable values include `categorical` and `continuous`.",
               "type": "string"
            },
            "segmentation": {
               "title": "Segmentation",
               "description": "If true (the default), the column is enabled for segmentation calculations.",
               "default": true,
               "type": "boolean"
            },
            "drift": {
               "title": "Drift",
               "description": "If true (the default), the column is enabled for drift calculations.",
               "default": true,
               "type": "boolean"
            },
            "hotspot": {
               "title": "Hotspot",
               "description": "If true (the default), the column is enabled for hotspot analysis.",
               "default": false,
               "type": "boolean"
            },
            "rca": {
               "title": "Rca",
               "description": "List of column names included for root cause analysis (rca). Set by the platform based on feature configuration to identify features available for hotspot analysis.",
               "default": [],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "round": {
               "title": "Round",
               "description": "The number of decimals to round to on a continuous float column.",
               "type": "integer"
            }
         },
         "required": [
            "name",
            "dtype",
            "sql_type",
            "feature_type"
         ]
      }
   }
}

Fields:
Validators:
field columns: List[V1InferenceMappingColumnSchema] [Required]

List of all columns.

Validated by:
field datetime_col: str = ''

Name of datetime column

field identifier_cols: List[str] = []

List of identifier columns.

field predict_proba_col: str | None = None

(Classification models only) Name of column that provides the predict probability.

field target_col: str [Required]

Name of target column.

validator column_validator  »  columns
pydantic model V1InferenceMappingSearch

Bases: V1PageSearch

Show JSON schema
{
   "title": "V1InferenceMappingSearch",
   "type": "object",
   "properties": {
      "page": {
         "title": "Page",
         "description": "Page number to return. Zero-index based. Cannot be less than zero or greater than number of pages. To make sure you don't exceed the number of pages, set `page` to 1 and run this search operation to return the total number items (`total`). Then run it again to return the exact page (`page`) for the specified number of items per page (`page-size`).",
         "type": "integer"
      },
      "page_size": {
         "title": "Page Size",
         "description": "Number of items to return on a page. Default is 25 items per page.",
         "default": 25,
         "type": "integer"
      },
      "order": {
         "title": "Order",
         "description": "Fields to use for ordering returned pages and the sort direction.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/V1OrderBy"
         }
      },
      "search": {
         "title": "Search",
         "description": "String to search for (case-insensitive) across all fields in previously created items.",
         "type": "string"
      },
      "filters": {
         "title": "Filters",
         "description": "Specifies different condition(s) for filtering the results. If not provided, all relevant results are retrieved.",
         "default": {
            "created_by": null,
            "modified_by": null,
            "created_ts_start": null,
            "created_ts_end": null,
            "modified_ts_start": null,
            "modified_ts_end": null,
            "uuid": null,
            "name": null,
            "status": null,
            "index": null,
            "df_schema": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/V1InferenceMappingFilters"
            }
         ]
      }
   },
   "required": [
      "page"
   ],
   "example": {
      "page": 1,
      "page_size": 100,
      "order": [
         {
            "field": "name",
            "direction": "DESC"
         }
      ],
      "search": "vianai",
      "filters": {
         "index": [
            1,
            2
         ],
         "model_name": [
            "Example model 1"
         ]
      }
   },
   "definitions": {
      "V1OrderBy": {
         "title": "V1OrderBy",
         "type": "object",
         "properties": {
            "field": {
               "title": "Field",
               "description": "Field to order by.",
               "type": "string"
            },
            "direction": {
               "title": "Direction",
               "description": "Direction to order the field by. Supported values: `ASC` (ascending) and `DESC` (descending) (case-insensitive).",
               "default": "ASC",
               "type": "string"
            }
         },
         "required": [
            "field"
         ]
      },
      "V1InferenceMappingFilters": {
         "title": "V1InferenceMappingFilters",
         "type": "object",
         "properties": {
            "created_by": {
               "title": "Created By",
               "description": "List of 'created by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "modified_by": {
               "title": "Modified By",
               "description": "List of 'modified by' users to search for.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "created_ts_start": {
               "title": "Created Ts Start",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "created_ts_end": {
               "title": "Created Ts End",
               "description": "Unix time in milliseconds for searching for all objects created during a specified time period.",
               "type": "number"
            },
            "modified_ts_start": {
               "title": "Modified Ts Start",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "modified_ts_end": {
               "title": "Modified Ts End",
               "description": "Unix time in milliseconds for searching for all objects modified during a specified time period.",
               "type": "number"
            },
            "uuid": {
               "title": "Uuid",
               "description": "List of uuids for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "name": {
               "title": "Name",
               "description": "List of names for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "status": {
               "title": "Status",
               "description": "List of statuses for this operation.",
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "index": {
               "title": "Index",
               "description": "Filter in addition to filters listed in V1Filters for this operation.",
               "type": "array",
               "items": {
                  "type": "integer"
               }
            },
            "df_schema": {
               "title": "Df Schema",
               "description": "One or more df_schema as a list of dict",
               "type": "array",
               "items": {
                  "type": "object"
               }
            }
         },
         "example": {
            "index": [
               "1",
               "2"
            ],
            "model_name": [
               "Example model 1"
            ]
         }
      }
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘page’: 1, ‘page_size’: 100, ‘order’: [{‘field’: ‘name’, ‘direction’: ‘DESC’}], ‘search’: ‘vianai’, ‘filters’: {‘index’: [1, 2], ‘model_name’: [‘Example model 1’]}}}

Fields:
field filters: V1InferenceMappingFilters | None = V1InferenceMappingFilters(created_by=None, modified_by=None, created_ts_start=None, created_ts_end=None, modified_ts_start=None, modified_ts_end=None, uuid=None, name=None, status=None, index=None, df_schema=None)

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

vianops_client.models.inferencestore.inference_tracking

pydantic model V1AddGroundTruthModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1AddGroundTruthModel",
   "type": "object",
   "properties": {
      "deployment": {
         "title": "Deployment",
         "description": "Name of the deployment.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Name of the model. Default value is deployment name.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version. Default value is `1`.",
         "default": "1",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage. Default value is `primary`.",
         "default": "primary",
         "type": "string"
      },
      "ground_truths": {
         "title": "Ground Truths",
         "description": "List of all ground-truth features and values.",
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "format": {
         "title": "Format",
         "description": "The format of the data sent in. Acceptable values include `file` and `raw`. Defaults to `raw`.",
         "default": "raw",
         "type": "string"
      },
      "file_type": {
         "title": "File Type",
         "description": "The file type of the data format. Acceptable values include: `csv`, `json`, or `parquet`. Defaults to `csv`.",
         "default": "csv",
         "type": "string"
      },
      "cache_key": {
         "title": "Cache Key",
         "description": "The cache key, if getting ground truth values from cache.",
         "type": "string"
      }
   },
   "required": [
      "deployment",
      "model_name"
   ],
   "example": {
      "deployment": "deployment_name",
      "model_name": "model_name",
      "model_stage": "primary",
      "model_version": "1",
      "ground_truths": [
         {
            "ground_truth": "13.8",
            "inf_uuid": "65_209_2022_03_01 00:00:00_0"
         }
      ],
      "format": "file",
      "file_type": "csv",
      "cache_key": "temp.123456"
   }
}

Config:
  • schema_extra: dict = {‘example’: {‘deployment’: ‘deployment_name’, ‘model_name’: ‘model_name’, ‘model_stage’: ‘primary’, ‘model_version’: ‘1’, ‘ground_truths’: [{‘ground_truth’: ‘13.8’, ‘inf_uuid’: ‘65_209_2022_03_01 00:00:00_0’}], ‘format’: ‘file’, ‘file_type’: ‘csv’, ‘cache_key’: ‘temp.123456’}}

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

The cache key, if getting ground truth values from cache.

field deployment: str [Required]

Name of the deployment.

field file_type: str | None = 'csv'

The file type of the data format. Acceptable values include: csv, json, or parquet. Defaults to csv.

field format: str | None = 'raw'

The format of the data sent in. Acceptable values include file and raw. Defaults to raw.

field ground_truths: List[dict] | None = None

List of all ground-truth features and values.

field model_name: str [Required]

Name of the model. Default value is deployment name.

Validated by:
field model_stage: str = 'primary'

Model stage. Default value is primary.

field model_version: str = '1'

Model version. Default value is 1.

validator grouped_filters_validator  »  model_name
pydantic model V1DeleteTracking

Bases: BaseModel

Show JSON schema
{
   "title": "V1DeleteTracking",
   "type": "object",
   "properties": {
      "deployment": {
         "title": "Deployment",
         "description": "Deployment name.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Model name.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version.",
         "type": "string"
      },
      "delete_tracking": {
         "title": "Delete Tracking",
         "description": "If `true`, inference trackings are deleted from the inference tracking table. Defaults to `false`.",
         "default": false,
         "type": "boolean"
      },
      "starttime": {
         "title": "Starttime",
         "description": "Inference trackings created after this time will be deleted (Unix time in milliseconds).",
         "type": "number"
      },
      "endtime": {
         "title": "Endtime",
         "description": "Inference trackings created before this time will be deleted (Unix time in milliseconds).",
         "type": "number"
      }
   },
   "required": [
      "deployment",
      "model_name",
      "model_version"
   ],
   "example": {
      "deployment": "placeholder_deployment_20230403214640",
      "model_name": "placeholder_deployment_20230403214640",
      "model_version": "1",
      "delete_tracking": true,
      "starttime": 1680105108000.01,
      "endtime": 1680107108000.01
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘deployment’: ‘placeholder_deployment_20230403214640’, ‘model_name’: ‘placeholder_deployment_20230403214640’, ‘model_version’: ‘1’, ‘delete_tracking’: True, ‘starttime’: 1680105108000.01, ‘endtime’: 1680107108000.01}}

Fields:
field delete_tracking: bool | None = False

If true, inference trackings are deleted from the inference tracking table. Defaults to false.

field deployment: str [Required]

Deployment name.

field endtime: float | None = None

Inference trackings created before this time will be deleted (Unix time in milliseconds).

field model_name: str [Required]

Model name.

field model_version: str [Required]

Model version.

field starttime: float | None = None

Inference trackings created after this time will be deleted (Unix time in milliseconds).

pydantic model V1InferenceTrackingModel

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceTrackingModel",
   "type": "object",
   "properties": {
      "uuid": {
         "title": "Uuid",
         "description": "Inference tracking unique identifier.",
         "type": "string"
      },
      "deployment": {
         "title": "Deployment",
         "description": "Name of the deployment.",
         "type": "string"
      },
      "model_name": {
         "title": "Model Name",
         "description": "Name of the model. Default value is deployment name.",
         "type": "string"
      },
      "model_version": {
         "title": "Model Version",
         "description": "Model version. Default value is `1`.",
         "default": "1",
         "type": "string"
      },
      "model_stage": {
         "title": "Model Stage",
         "description": "Model stage. Default value is `primary`.",
         "default": "primary",
         "type": "string"
      },
      "hostname": {
         "title": "Hostname",
         "description": "Hostname for the model.",
         "type": "string"
      },
      "starttime": {
         "title": "Starttime",
         "description": "Timestamp of the first inferences tracked in Unix time in milliseconds",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "endtime": {
         "title": "Endtime",
         "description": "Timestamp of the last inferences tracked in Unix time in milliseconds",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "num_inferences": {
         "title": "Num Inferences",
         "description": "Total number of inferences included in this inference tracking.",
         "type": "integer"
      },
      "inputs": {
         "title": "Inputs",
         "description": "List of all input features and values.",
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "outputs": {
         "title": "Outputs",
         "description": "List of all prediction values.",
         "type": "array",
         "items": {
            "anyOf": [
               {
                  "type": "string"
               },
               {
                  "type": "integer"
               },
               {
                  "type": "boolean"
               },
               {
                  "type": "number"
               }
            ]
         }
      },
      "ground_truth": {
         "title": "Ground Truth",
         "description": "List of all ground-truth features and values.",
         "type": "array",
         "items": {
            "anyOf": [
               {
                  "type": "string"
               },
               {
                  "type": "integer"
               },
               {
                  "type": "boolean"
               },
               {
                  "type": "number"
               }
            ]
         }
      },
      "xformed_inputs": {
         "title": "Xformed Inputs",
         "description": "List of all transformed-input features and values.",
         "type": "array",
         "items": {
            "type": "object"
         }
      },
      "modified_ts": {
         "title": "Modified Ts",
         "description": "Timestamp for the last time the inferences were modified in Unix time in milliseconds.",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "string",
               "format": "date-time"
            }
         ]
      },
      "modified_indexes": {
         "title": "Modified Indexes",
         "description": "List of modified indexes.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "inference_mapping_index": {
         "title": "Inference Mapping Index",
         "description": "Inference mapping index related to the inference tracking.",
         "type": "integer"
      },
      "inference_mapping": {
         "title": "Inference Mapping",
         "description": "Inference mapping values related to the inference tracking.",
         "type": "object"
      }
   },
   "required": [
      "deployment",
      "model_name",
      "starttime",
      "endtime"
   ],
   "example": {
      "uuid": "000121d1-e790-46f9-b603-c168eba631ac",
      "deployment": "0234_placeholder_deployment",
      "model_name": "0234_placeholder_deployment",
      "model_stage": "primary",
      "model_version": "1",
      "hostname": "model_host",
      "starttime": "1654703247907.512",
      "endtime": "1654703247921.791",
      "num_inferences": 4,
      "inputs": [
         {
            "feature_a": 1.0,
            "feature_b": 42,
            "feature_c": 42,
            "feature_d": 1.0
         }
      ],
      "outputs": [
         1
      ],
      "ground_truth": [
         1
      ],
      "xformed_inputs": [
         1
      ],
      "modified_ts": "1654703247907.512",
      "modified_indexes": [
         10000,
         20000,
         30000
      ],
      "inference_mapping_index": 1,
      "inference_mapping": [
         {}
      ]
   }
}

Config:
  • orm_mode: bool = True

  • schema_extra: dict = {‘example’: {‘uuid’: ‘000121d1-e790-46f9-b603-c168eba631ac’, ‘deployment’: ‘0234_placeholder_deployment’, ‘model_name’: ‘0234_placeholder_deployment’, ‘model_stage’: ‘primary’, ‘model_version’: ‘1’, ‘hostname’: ‘model_host’, ‘starttime’: ‘1654703247907.512’, ‘endtime’: ‘1654703247921.791’, ‘num_inferences’: 4, ‘inputs’: [{‘feature_a’: 1.0, ‘feature_b’: 42, ‘feature_c’: 42, ‘feature_d’: 1.0}], ‘outputs’: [1], ‘ground_truth’: [1], ‘xformed_inputs’: [1], ‘modified_ts’: ‘1654703247907.512’, ‘modified_indexes’: [10000, 20000, 30000], ‘inference_mapping_index’: 1, ‘inference_mapping’: [{}]}}

Fields:
Validators:
field deployment: str [Required]

Name of the deployment.

field endtime: float | datetime [Required]

Timestamp of the last inferences tracked in Unix time in milliseconds

field ground_truth: List[str | int | bool | float] | None = None

List of all ground-truth features and values.

field hostname: str | None = None

Hostname for the model.

field inference_mapping: dict | None = None

Inference mapping values related to the inference tracking.

field inference_mapping_index: int | None = None

Inference mapping index related to the inference tracking.

field inputs: List[dict] | None = None

List of all input features and values.

field model_name: str [Required]

Name of the model. Default value is deployment name.

Validated by:
field model_stage: str = 'primary'

Model stage. Default value is primary.

field model_version: str = '1'

Model version. Default value is 1.

field modified_indexes: List[int] | None = None

List of modified indexes.

field modified_ts: float | datetime | None = None

Timestamp for the last time the inferences were modified in Unix time in milliseconds.

field num_inferences: int | None = None

Total number of inferences included in this inference tracking.

field outputs: List[str | int | bool | float] | None = None

List of all prediction values.

field starttime: float | datetime [Required]

Timestamp of the first inferences tracked in Unix time in milliseconds

field uuid: str | None = None

Inference tracking unique identifier.

field xformed_inputs: List[dict] | None = None

List of all transformed-input features and values.

validator grouped_filters_validator  »  model_name
pydantic model V1InferenceTrackingModelList

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceTrackingModelList",
   "default": [],
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1InferenceTrackingModel"
   },
   "definitions": {
      "V1InferenceTrackingModel": {
         "title": "V1InferenceTrackingModel",
         "type": "object",
         "properties": {
            "uuid": {
               "title": "Uuid",
               "description": "Inference tracking unique identifier.",
               "type": "string"
            },
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment.",
               "type": "string"
            },
            "model_name": {
               "title": "Model Name",
               "description": "Name of the model. Default value is deployment name.",
               "type": "string"
            },
            "model_version": {
               "title": "Model Version",
               "description": "Model version. Default value is `1`.",
               "default": "1",
               "type": "string"
            },
            "model_stage": {
               "title": "Model Stage",
               "description": "Model stage. Default value is `primary`.",
               "default": "primary",
               "type": "string"
            },
            "hostname": {
               "title": "Hostname",
               "description": "Hostname for the model.",
               "type": "string"
            },
            "starttime": {
               "title": "Starttime",
               "description": "Timestamp of the first inferences tracked in Unix time in milliseconds",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "endtime": {
               "title": "Endtime",
               "description": "Timestamp of the last inferences tracked in Unix time in milliseconds",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "num_inferences": {
               "title": "Num Inferences",
               "description": "Total number of inferences included in this inference tracking.",
               "type": "integer"
            },
            "inputs": {
               "title": "Inputs",
               "description": "List of all input features and values.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            "outputs": {
               "title": "Outputs",
               "description": "List of all prediction values.",
               "type": "array",
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "integer"
                     },
                     {
                        "type": "boolean"
                     },
                     {
                        "type": "number"
                     }
                  ]
               }
            },
            "ground_truth": {
               "title": "Ground Truth",
               "description": "List of all ground-truth features and values.",
               "type": "array",
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "integer"
                     },
                     {
                        "type": "boolean"
                     },
                     {
                        "type": "number"
                     }
                  ]
               }
            },
            "xformed_inputs": {
               "title": "Xformed Inputs",
               "description": "List of all transformed-input features and values.",
               "type": "array",
               "items": {
                  "type": "object"
               }
            },
            "modified_ts": {
               "title": "Modified Ts",
               "description": "Timestamp for the last time the inferences were modified in Unix time in milliseconds.",
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string",
                     "format": "date-time"
                  }
               ]
            },
            "modified_indexes": {
               "title": "Modified Indexes",
               "description": "List of modified indexes.",
               "type": "array",
               "items": {
                  "type": "integer"
               }
            },
            "inference_mapping_index": {
               "title": "Inference Mapping Index",
               "description": "Inference mapping index related to the inference tracking.",
               "type": "integer"
            },
            "inference_mapping": {
               "title": "Inference Mapping",
               "description": "Inference mapping values related to the inference tracking.",
               "type": "object"
            }
         },
         "required": [
            "deployment",
            "model_name",
            "starttime",
            "endtime"
         ],
         "example": {
            "uuid": "000121d1-e790-46f9-b603-c168eba631ac",
            "deployment": "0234_placeholder_deployment",
            "model_name": "0234_placeholder_deployment",
            "model_stage": "primary",
            "model_version": "1",
            "hostname": "model_host",
            "starttime": "1654703247907.512",
            "endtime": "1654703247921.791",
            "num_inferences": 4,
            "inputs": [
               {
                  "feature_a": 1.0,
                  "feature_b": 42,
                  "feature_c": 42,
                  "feature_d": 1.0
               }
            ],
            "outputs": [
               1
            ],
            "ground_truth": [
               1
            ],
            "xformed_inputs": [
               1
            ],
            "modified_ts": "1654703247907.512",
            "modified_indexes": [
               10000,
               20000,
               30000
            ],
            "inference_mapping_index": 1,
            "inference_mapping": [
               {}
            ]
         }
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.inferencestore.inference_tracking.V1InferenceTrackingModel])

pydantic model V1InferenceTrackingModelStatsListGroupedByDayOrHour

Bases: BaseModel

Show JSON schema
{
   "title": "V1InferenceTrackingModelStatsListGroupedByDayOrHour",
   "type": "array",
   "items": {
      "$ref": "#/definitions/V1InferenceTrackingStats"
   },
   "definitions": {
      "V1InferenceTrackingStats": {
         "title": "V1InferenceTrackingStats",
         "type": "object",
         "properties": {
            "deployment": {
               "title": "Deployment",
               "description": "Name of the deployment.",
               "type": "string"
            },
            "date": {
               "title": "Date",
               "description": "The inference trackings within this datetime.",
               "type": "string",
               "format": "date-time"
            },
            "hour": {
               "title": "Hour",
               "description": "The inference trackings within this hour.",
               "type": "number"
            },
            "peak_requests": {
               "title": "Peak Requests",
               "description": "The number of inference tracking requests per minute within specified timeframe.",
               "type": "integer"
            },
            "predicts": {
               "title": "Predicts",
               "description": "The number of predictions within timeframe.",
               "type": "integer"
            },
            "requests": {
               "title": "Requests",
               "description": "The number of requests within timeframe.",
               "type": "integer"
            },
            "mean_execution_time": {
               "title": "Mean Execution Time",
               "description": "The mean execution time in milliseconds (ms) within timeframe.",
               "type": "number"
            }
         },
         "required": [
            "deployment",
            "date",
            "peak_requests",
            "predicts",
            "requests",
            "mean_execution_time"
         ]
      }
   }
}

Fields:
  • __root__ (List[vianops_client.models.inferencestore.inference_tracking.V1InferenceTrackingStats])

pydantic model V1RanMetricIndexes

Bases: BaseModel

Show JSON schema
{
   "title": "V1RanMetricIndexes",
   "type": "object",
   "properties": {
      "indexes": {
         "title": "Indexes",
         "type": "array",
         "items": {
            "type": "integer"
         }
      }
   },
   "required": [
      "indexes"
   ]
}

Fields:
field indexes: List[int] [Required]
pydantic model V1SeldonPayload

Bases: BaseModel

Show JSON schema
{
   "title": "V1SeldonPayload",
   "type": "object",
   "properties": {
      "seldon_headers": {
         "title": "Seldon Headers"
      },
      "seldon_body": {
         "title": "Seldon Body"
      }
   }
}

Fields:
field seldon_body: Any = None
field seldon_headers: Any = None