Now we've created the monitoring model, we can start tweaking its settings before running it.
To do so, we'll fetch the RuntimeConfiguration linked to the monitoring model. It offers methods to easily fetch and modify the configuration entries.
# Fetch the correct RuntimeConfigurationconfig = sdk.monitoring.RuntimeConfiguration.get(model_id=model["id"])# Now we can use this object to manipulate the monitoring model settings.# Let's enable the Jensen-Shannon Univariate Covariate Shift method for our target values.config.univariate_drift_method("JENSEN_SHANNON").enable_targets()# Let's disable the Domain Classifier Multivariate Covariate Shift methodconfig.multivariate_drift_method("DOMAIN_CLASSIFIER_AUROC").disable()# Let's set a constant threshold for the Missing Values data quality metricconfig.data_quality_metric("MISSING_VALUES").set_threshold(threshold_type="CONSTANT", upper=5)# Now apply the altered configurationsdk.monitoring.RuntimeConfiguration.set(model_id=model["id"], config=config)