Create prediction function

Create validation dataset

SuperAlign expects the dataset version to be used for validation in a specific manner.

Run your first evaluation

from pureml.decorators import dataset

@dataset("<dataset_name>")
def create_validation_dataset():
    x_test = #Data for testing
    y_test = #Labels for testing

    return {"x_test":x_test, "y_test":y_test}

Any dataset that is intended to be used in model validation should be registered in a dictionary format with mandatory keys; “x_test” for testing data, and “y_test” for dataset labels.

Requirements

You need to install pureml-evaluate to apply policies.

pip3 install pureml-evaluate

Running Policy

from pureml_evaluate.policy import policy_eval
results = policy_eval.eval(label_model='Credit Underwriting:v1',
            label_dataset='Credit Loan Dataset:v1')

SuperAlign supports two task types for evaluation, “classification”, and “regression”.