Model APIs
ML Commons supports the following model-level CRUD APIs:
Predict APIs
Predict APIs are used to invoke machine learning (ML) models. ML Commons supports the following Predict APIs:
- Predict
- Batch Predict (experimental)
Train API
The ML Commons Train API lets you train ML algorithms synchronously and asynchronously:
To train tasks through the API, three inputs are required:
- Algorithm name: Must be a FunctionName. This determines what algorithm the ML model runs. To add a new function, see How To Add a New Function.
- Model hyperparameters: Adjust these parameters to improve model accuracy.
- Input data: The data that trains the ML model or applies it to predictions. You can input data in two ways: query against your index or use a data frame.
Train and Predict API
The Train and Predict API lets you train and invoke the model using the same dataset:
Model access control considerations
For clusters with model access control enabled, users can perform API operations on models in model groups with specified access levels as follows:
public
model group: Any user.restricted
model group: Only the model owner or users who share at least one backend role with the model group.private
model group: Only the model owner.
For clusters with model access control disabled, any user can perform API operations on models in any model group.
Admin users can perform API operations for models in any model group.
For more information, see Model access control.