Risk store APIs
Operations for accessing and managing data for drift, explainability, and uncertainty. This data is maintained in the VIANOPS risk store database.
vianops_client.api.riskstore.drift
- class DriftV1Api(config: Config | None = None)
Bases:
ConfiguredBaseApiClass
- create_drfit_detection(data: V1DriftDetectionModel, output_type: str = 'object') V1DriftDetectionModel
Add drift detection
- Parameters:
data (V1DriftDetectionModel) – Instance containing information about the drift detection data to be added.
- Returns:
Instance containing information about the drift detection data added.
- Return type:
- delete_by_index(index: int) None
Delete drift detection data by its index
- Parameters:
index (int) – The index of the drift detection data to delete.
- Returns:
None
- delete_url = '/v1/driftdetections/{index}'
- get_by_index(index: int, output_type: str = 'object') V1DriftDetectionModel
Retrieve drift detection data by index
- Parameters:
index (int) – The index of the drift detection to retrieve.
- Returns:
Instance containing information about the drift detection data with the specified index.
- Return type:
- get_by_job_id(job_id: str, output_type: str = 'object') V1DriftDetectionModel
Retrieve drift detection data by job id
- Parameters:
job_id (str) – The job id of the drift detection to retrieve.
- Returns:
Instance containing information about the drift detection with the specified job id.
- Return type:
- get_by_key(key: str, output_type: str = 'object') V1DriftDetectionModel
Retrieve drift detection data by key
- Parameters:
key (str) – The key of the drift detection to retrieve.
- Returns:
Instance containing information about the drift detection with the specified key.
- Return type:
- get_by_model_name(model_name: str, output_type: str = 'object') V1DriftDetectionModel
Retrieve drift detection data by model name
- Parameters:
model_name (str) – The model name of the drift detection to retrieve.
- Returns:
Instance containing information about the drift detection with the specified model name.
- Return type:
- get_by_params(job_id: str | None = None, feature_set_name: str | None = None, deployment: str | None = None, model_name: str | None = None, model_version: str | None = None, model_stage: str | None = None, hostname: str | None = None, drift_config: str | None = None, type: str | None = None, runtime: float | None = None, key: str | None = None, drift_policy_name: str | None = None, limit: int | None = None, output_type: str = 'object') V1DriftDetectionModelList
Retrieve drift detection data based on given params
- Parameters:
job_id (str, optional) – The job ID to filter drift detections by. (Optional)
feature_set_name (str, optional) – The feature set name to filter drift detections by. (Optional)
deployment (str, optional) – The deployment to filter drift detections by. (Optional)
model_name (str, optional) – The model name to filter drift detections by. (Optional)
model_version (str, optional) – The model version to filter drift detections by. (Optional)
model_stage (str, optional) – The model stage to filter drift detections by. (Optional)
hostname (str, optional) – The hostname to filter drift detections by. (Optional)
drift_config (str, optional) – The drift config to filter drift detections by. (Optional)
type (str, optional) – The type to filter drift detections by. (Optional)
runtime (float, optional) – The runtime to filter drift detections by. (Optional)
key (str, optional) – The key to filter drift detections by. (Optional)
drift_policy_name (str, optional) – The drift policy name to filter drift detections by. (Optional)
limit (int, optional) – The maximum number of drift detections to retrieve. (Optional)
- Returns:
An instance of V1DriftDetectionModelList containing a list of drift detection information.
- Return type:
- index_url = '/v1/driftdetections/index/{index}'
- job_id_url = '/v1/driftdetections/job_id/{job_id}'
- key_url = '/v1/driftdetections/key/{key}'
- model_name_url = '/v1/driftdetections/model_name/{model_name}'
- update_drift(data: V1DriftDetectionModel, output_type: str = 'object') V1DriftDetectionModel
Update existing drift detection data
- Parameters:
data (V1DriftDetectionModel) – Instance containing the data for the drift detection update.
- Returns:
Instance containing information about the updated drift detection data.
- Return type:
- url_suffix = '/v1/driftdetections'
vianops_client.api.riskstore.explainability
- class ExplainabilityV1Api(config: Config | None = None)
Bases:
ConfiguredBaseApiClass
- create_explainability(data: V1ExplainabilityModel, output_type: str = 'object') V1ExplainabilityModel
Add explainability data
- Parameters:
data (V1ExplainabilityModel) – Instance containing information about the explainability data to be added.
- Returns:
Instance containing information about the explainability data added.
- Return type:
- delete_explainability(index: int) None
Delete explainability data by its index
- Parameters:
index (int) – The index of the explainability data to delete.
- Returns:
None
- delete_url = '/v1/explainability/{index}'
- get_by_index(index: int, output_type: str = 'object') V1ExplainabilityModel
Retrieve explainability data by its index
- Parameters:
index (int) – The index of the explainability data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified index.
- Return type:
- get_by_job_id(job_id: str, output_type: str = 'object') V1ExplainabilityModel
Retrieve explainability data by its job id
- Parameters:
job_id (str) – The job id of the explainability data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified job id.
- Return type:
- get_by_key(key: str, output_type: str = 'object') V1ExplainabilityModel
Retrieve explainability data by its key
- Parameters:
key (str) – The key of the explainability data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified key.
- Return type:
- get_by_model_name(model_name: str, output_type: str = 'object') V1ExplainabilityModel
Retrieve explainability data by its model name
- Parameters:
model_name (str) – The model name of the explainability data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified model name.
- Return type:
- get_by_params(job_id: str | None = None, feature_set_name: str | None = None, deployment: str | None = None, model_name: str | None = None, model_version: str | None = None, model_stage: str | None = None, hostname: str | None = None, explainability_config: dict | None = None, runtime: float | None = None, key: str | None = None, output_type: str = 'object') V1ExplainabilityModelList
Retrieve explainability data based on given parameters
- Parameters:
job_id (str, optional) – The job id to filter explainability data by.
feature_set_name (str, optional) – The feature set name to filter explainability data by.
deployment (str, optional) – The deployment to filter explainability data by.
model_name (str, optional) – The model name to filter explainability data by.
model_version (str, optional) – The model version to filter explainability data by.
model_stage (str, optional) – The model stage to filter explainability data by.
hostname (str, optional) – The hostname to filter explainability data by.
explainability_config (dict, optional) – The configuration to filter explainability data by.
runtime (float, optional) – The runtime to filter explainability data by.
key (str, optional) – The key to filter explainability data by.
- Returns:
Instance containing information about explainability data with the specified params.
- Return type:
- index_url = '/v1/explainability/index/{index}'
- job_id_url = '/v1/explainability/job_id/{job_id}'
- key_url = '/v1/explainability/key/{key}'
- model_name_url = '/v1/explainability/model_name/{model_name}'
- update_explainability(data: V1ExplainabilityModel, output_type: str = 'object') V1ExplainabilityModel
Update existing explainability data
- Parameters:
data (V1ExplainabilityModel) – Instance containing the data for the explainability update.
- Returns:
Instance containing information about the updated explainability data.
- Return type:
- url_suffix = '/v1/explainability'
vianops_client.api.riskstore.uncertainty
- class UncertaintyV1Api(config: Config | None = None)
Bases:
ConfiguredBaseApiClass
- create_uncertainty(data: V1UncertaintyModel, output_type: str = 'object') V1UncertaintyModel
Add uncertainty data
- Parameters:
data (V1UncertaintyModel) – Instance containing information about the uncertainty data to be added.
- Returns:
Instance containing information about the uncertainty data added.
- Return type:
- delete_uncertainty(index: int) None
Delete an uncertainty data by its index.
- Parameters:
index (int) – The index of the uncertainty data to delete.
- Returns:
None
- delete_url = '/v1/uncertainty/{index}'
- feature_set_name_url = '/v1/uncertainty/feature_set_name/{feature_set_name}'
- get_by_feature_set_name(feature_set_name: str, output_type: str = 'object') V1UncertaintyModel
Retrieve uncertainty data by its feature set name.
- Parameters:
feature_set_name (str) – The feature set name of the uncertainty data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified feature set name.
- Return type:
- get_by_index(index: int, output_type: str = 'object') V1UncertaintyModel
Retrieve uncertainty data by its index.
- Parameters:
index (int) – The index of the uncertainty data to retrieve.
- Returns:
An instance of V1UncertaintyModel containing information about the specified uncertainty data.
- Return type:
- get_by_job_id(job_id: str, output_type: str = 'object') V1UncertaintyModel
Retrieve uncertainty data by its job id.
- Parameters:
job_id (str) – The job id of the uncertainty data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified job id.
- Return type:
- get_by_key(key: str, output_type: str = 'object') V1UncertaintyModel
Retrieve uncertainty data by its key.
- Parameters:
key (str) – The key of the uncertainty data to retrieve.
- Returns:
Instance containing information about the explainability data with the specified key.
- Return type:
- get_by_params(job_id: str | None = None, feature_set_name: str | None = None, experiment_type: str | None = None, experiment_metric: str | None = None, target_column: str | None = None, categorical_columns: str | None = None, runtime: float | None = None, key: str | None = None, output_type: str = 'object') V1UncertaintyModelList
Retrieve uncertainty data based on given params
- Parameters:
job_id (str, optional) – The job ID to filter uncertainty data by.
feature_set_name (str, optional) – The feature set name to filter uncertainty data by.
experiment_type (str, optional) – The experiment type to filter uncertainty data by.
experiment_metric (str, optional) – The experiment metric to filter uncertainty data by.
target_column (str, optional) – The target column to filter uncertainty data by.
categorical_columns (str, optional) – The categorical columns to filter uncertainty data by.
runtime (float, optional) – The runtime to filter uncertainty data by.
key (str, optional) – The key to filter uncertainty data by.
- Returns:
Instance containing information about uncertainty data with the specified params.
- Return type:
- index_url = '/v1/uncertainty/index/{index}'
- job_id_url = '/v1/uncertainty/job_id/{job_id}'
- key_url = '/v1/uncertainty/key/{key}'
- update_uncertainty(data: V1UncertaintyModel, output_type: str = 'object') V1UncertaintyModel
Update existing uncertainty data
- Parameters:
data (V1UncertaintyModel) – Instance containing the data for the uncertainty update.
- Returns:
Instance containing information about the updated uncertainty data.
- Return type:
- url_suffix = '/v1/uncertainty'
vianops_client.api.riskstore.model_metrics
- class ModelMetricsV1Api(config: Config | None = None)
Bases:
ConfiguredBaseApiClass
- create(data: V1ModelMetricsModelList, output_type: str = 'object') V1ModelMetricsModelList
Create model metrics
- Parameters:
data (V1ModelMetricsModelList) – Instance containing data to create model metrics.
- Returns:
Instance containing a list of the created model metrics.
- Return type:
- delete(data: V1ModelMetricSearch, deletetype: str = 'archive', output_type: str = 'object') V1ModelMetricsModelList
Delete or archive model metrics
- Parameters:
data (V1ModelMetricSearch) – Instance containing data required to select and archive or delete the model metrics.
deletetype (str) – The deletion type. Supported values: archive (enables future access), delete (deletes inactive model metrics), force_delete (deletes all model metrics, active and inactive). Default: archive.
- Returns:
Instance containing response from deleting model metrics.
- Return type:
- delete_url = '/v1/model-metrics/{deletetype}'
- search(data: V1ModelMetricSearch, output_type: str = 'object') V1ModelMetricsModelPage
Search for model metrics
- Parameters:
data (V1ModelMetricSearch) – Instance containing data to be used to perform a paginated model metrics search.
- Returns:
Instance containing a list of model metrics returned from search along with pagination details.
- Return type:
- search_url = '/v1/model-metrics/search'
- update(data: V1ModelMetricsUpdates, output_type: str = 'object') V1ModelMetricsModelList
Update model metrics
- Parameters:
data (V1ModelMetricsUpdates) – Instance containing data required to select and update specified model metrics.
- Returns:
Instance containing information about the updated model metrics.
- Return type:
- url_suffix = '/v1/model-metrics'