BudgetML: Deploy ML Models on a Budget

Category :

BudgetML Header

Introduction

BudgetML is a revolutionary tool designed for practitioners aiming to quickly deploy machine learning models without breaking the bank. The developers understood that many data scientists face hurdles when trying to get their models into production quickly and at minimal cost. Whether you’re struggling with the complexities of cloud functions or overwhelmed by Kubernetes setups for a single model, BudgetML is here to simplify the process.

Why Choose BudgetML?

  • Fast and easy to set up.
  • Reduces deployment costs significantly by using Google Cloud Platform preemptible instances.
  • Generates secure HTTPS API endpoints.
  • Requires minimal technical knowledge compared to full-fledged production setups.

Key Features

  • Automatic FastAPI server endpoint generation.
  • Fully interactive documentation via Swagger.
  • Built-in SSL certificate generation via Let’s Encrypt.
  • Utilizes cheap preemptible instances with a 99% uptime rate.
  • Provides OAuth2 secured endpoints.

Cost Comparison

BudgetML leverages the cost-effectiveness of Google Cloud Preemptible instances, offering savings of up to 80%. This could translate into significant financial relief, with potential savings ranging from $46 to $370 per month depending on your machine type. Here’s an example of how the costs compare:

GCP Costs

Installation

Installing BudgetML is a breeze through PyPI. Run the following command:

pip install budgetml

If you want to explore the cutting-edge version, you can install it via GitHub (use at your own risk):

pip install git+https://github.com/ebhy/budgetml.git@main --upgrade

Quickstart Guide

Getting started with BudgetML is straightforward. Below is an analogy: think of deploying a machine learning model like setting up a coffee stand at a busy street corner.

When you run a simple coffee stand:

  • You need to have your coffee machine (your model) ready to serve customers quickly.
  • You have a sign displaying the coffee types (the FastAPI server) where customers can read and understand what you offer.
  • Secure payment options are similar to the OAuth2 secured endpoints you would set up.
  • If the coffee machine shuts down temporarily (like a preemptible instance), BudgetML ensures it’s back up and running quickly, minimizing your downtime.

Here’s how to set up your coffee stand—to launch a model with BudgetML:

python
# predictor.py
class Predictor:
    def load(self):
        from transformers import pipeline
        self.model = pipeline(task="sentiment-analysis")
    
    async def predict(self, request):
        req = request.payload
        return self.model(req["text"])[0]

Then, simply launch it with the following script:

python
# deploy.py
import budgetml
from predictor import Predictor

budgetml = budgetml.BudgetML(project='GCP_PROJECT')
budgetml.launch(
    Predictor,
    domain='example.com',
    subdomain='api',
    static_ip='32.32.32.322',
    machine_type='e2-medium',
    requirements=['tensorflow==2.3.0', 'transformers'],
)

Troubleshooting

If you encounter issues during installation or deployment, consider the following tips:

  • Ensure that all dependencies are correctly specified in your launch script.
  • Check your Google Cloud Platform settings for permissions.
  • If the budgetml command fails, try running it in a different environment, such as a virtual environment.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

BudgetML is a game-changer for anyone looking to deploy machine learning models efficiently and affordably. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Projects Using BudgetML

BudgetML is proudly used in live projects, including:

For Advanced Needs

If you’re operating in a more serious production environment, consider using ZenML, an open-source MLOps framework ready to meet comprehensive production requirements.

Connect with Us

The BudgetML team consists of two passionate brothers dedicated to creating innovative ML solutions and we’d love to hear about your experiences using BudgetML!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox

Latest Insights

© 2024 All Rights Reserved

×