Configure an ML Engine
You can create machine learning (ML) engines based on the ML handlers available in MindsDB. If you can’t find the ML handler of your interest, you can always contribute by building a new ML handler.
Description
The CREATE ML_ENGINE
command creates an ML engine that uses one of the available ML handlers.
Syntax
Before creating an ML engine, make sure that the ML handler of your interest is available by querying for the ML handlers.
If you can’t find the ML handler of your interest, you can contribute by building a new ML handler.
Please note that in the process of contributing new ML engines, ML engines and/or their tests will only run correctly if all dependencies listed in the requirements.txt
file are installed beforehand.
If you find the ML handler of your interest, then you can create an ML engine using this command:
Please replace ml_engine_name
, handler_name
, and optionally, argument_key
and argument_value
with the real values.
Please do not use the same ml_engine_name
as the handler_name
to avoid issue while dropping the ML engine.
To verify that your ML engine was successfully created, run the command below:
If you want to drop an ML engine, run the command below:
Example
Let’s check what ML handlers are currently available:
On execution, we get:
Here we create an ML engine using the OpenAI handler and providing an OpenAI API key in the USING
clause.
On execution, we get:
Now let’s verify that our ML engine exists.
On execution, we get:
Please note that the USING
clause is optional, as it depends on the ML handler whether it requires some arguments or not. Here, we created an OpenAI engine and provided own API key.
After creating your ML engine, you can create a model like this:
The USING
clause specifies the ML engine to be used for creating a new model.
Was this page helpful?