Introduction to BYOM: Upload Custom Models to MindsDB

Cover Image for Introduction to BYOM: Upload Custom Models to MindsDB

We are happy to announce a new feature available for MindsDB Pro users - Bring Your Own Model (BYOM). This feature lets you upload custom ML models to MindsDB and incorporate them into the MindsDB ecosystem.

In this blog post, we'll introduce the BYOM feature and present how to upload a custom model to MindsDB.

Why Bring Your Models to MindsDB

Integrating ML models with data can be a daunting task, often requiring complex Extract, Transform, Load (ETL) pipelines. MindsDB streamlines this process by facilitating in-database machine learning. With MindsDB, you can train and deploy your custom model directly within the data environment, eliminating the need for intricate data movement and transformation steps.

By uploading your model to MindsDB, you gain the advantage of utilizing it seamlessly with all connected data sources. MindsDB allows you to leverage your model across diverse datasets. Whether your data resides in relational databases, cloud storage, or data warehouses, MindsDB ensures that your uploaded model can effortlessly access and analyze the data it requires.

The ease of using your uploaded model with various data sources opens up a world of opportunities. You can conduct real-time predictions, forecast trends, and gain valuable insights from the continuously evolving data landscape. Within MindsDB, your custom model stays synchronized with the connected data sources, enabling you to make decisions based on the most up-to-date information.

To summarize, here are the benefits of uploading your custom ML model to MindsDB:

  • It simplifies the process of incorporating custom models into the data environment.

  • It eliminates complex ETL pipelines.

  • It enables in-database machine learning.

With the BYOM feature, MindsDB helps you leverage the power of your models across diverse datasets and stay ahead of the curve in data-driven decision-making.

How to Bring Your Own Model

ML models are commonly implemented using the Python programming language. To bring your custom model to MindsDB, you must upload the Python code along with the requirements.txt file.

To do so, click the Add button and Upload custom model, like this:

Here is the form that needs to be filled out in order to bring your model to MindsDB:

First, you must upload a Python file with the model’s implementation followed by the requirements file that stores all the dependencies. Then provide an engine name that will be used to create the model.

Here is an example of how to set up your model in MindsDB (given the engine name is custom_ML_engine):

CREATE MODEL custom_model
FROM my_integration
    (SELECT * FROM my_table)
PREDICT target
USING
    ENGINE = 'custom_ML_engine';

Once your model is uploaded, it can leverage all available MindsDB features.

  • Use the SELECT command to make predictions.

  • Use the JOIN clause to join your model with a data table and make batch predictions.

Stay tuned for the upcoming features:

  • Describing models with the DESCRIBE command.

  • Retraining models to accommodate the latest developments with the RETRAIN command.

  • Finetuning models using a specific dataset with the FINETUNE command.

To learn more, check out our documentation here.

Try It Out

MindsDB offers a variety of resources to help you get started and succeed in your ML projects. If you are a MindsDB Pro user, you can upload your own custom model and incorporate it into the MindsDB ecosystem using the BYOM feature.

If you are new to MindsDB and require any assistance, join our Slack community to ask questions and share feedback.