Versioning
For registered models, prediction function along with its requirements and resources can be logged to be used for further processes like evaluating and packaging.
Prediction Class
SuperAlign expects the prediction function in a specific format:
This is a template for writing Predictor class. SuperAlign expects this format for the class to use for evaluation, packaging of models etc.
Let’s look at the Structure of the Predictor
class.
Predictor
inherits the BasePredictor
which contains variables and abstract methods that have to be overwritten by the user.
Predictor
.Variables
label
: Contains the label for the model version
input
: Contains the input data type that is passed into predict
function
output
: Contains the data type of the output returned by the predict
function
Functions
load_models
: Contains the functionality to load the prediction model
predict
: Contains the functionality to obtain the predictions on the data
passed to the function.
Apart from the above-mentioned variables, and functions, user can add more
functionality to the Predictor
class
Logging Prediction
Logging Prediction function along with its requirements: