Link Search Menu Expand Document Documentation Menu

You're viewing version 2.17 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

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:

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.

350 characters left

Have a question? .

Want to contribute? or .