Define model schema with ModelAPI

ModelAPI captures the model schema that includes model input, output column and data type definitions. When you register a model in Verta, we provide a function to log your model schema. Every registered model version in Verta captures ModelAPI information.

With the ModelAPI information, Verta monitoring system can automatically configure features and predictions for monitoring and setup drift alerts.

This is how ModelAPI is logged for a Registered Model Version:

model_version = registered_model.create_standard_model(
    name = "v1",
    model_cls = CensusIncomeClassifier,
    model_api = ModelAPI(X_train, Y_train_with_confidence),
    environment = Python(requirements=["scikit-learn"]),
    artifacts = artifacts_dict
)

ModelAPI captures the feature and output columns from your training dataset in order to define your model schema.

Once logged you can review ModelAPI information in the Registered Model Version in webapp.

As of Verta Release 2022.04, confidence scores are required for classification models in order to accurately compute ROC and PR curves. It is recommended to include confidence columns when you are passing training dataset to Model API. The naming convention is ".confidence" to identify the column as the confidence score

The model schema may not be static and as new features are added, Verta captures the updated schema via model registry and applies it to the monitoring system.

Last updated