Skip to main content

A library to simplify your ML model deployments

Project description

ML Deploy Lite

The ML Deploy Lite Library is a powerful and user-friendly solution designed to simplify the deployment of machine learning models in production environments. This library provides a comprehensive set of tools and utilities to facilitate the management, serving, and monitoring of machine learning models, making it easier for developers and data scientists to integrate their models into applications.

Installation: To install the library, run the following command:

pip install ml_deploy_lite

Key Features:

  • Model Serving: The library offers robust APIs for serving machine learning models, allowing users to expose their models as RESTful services. This enables easy integration with web applications and other services.

  • Version Management: ML Deploy Lite supports versioning of machine learning models, enabling users to manage multiple versions of their models seamlessly. This feature is crucial for maintaining and updating models in production without downtime.

  • Monitoring and Logging: The library includes built-in monitoring tools to track model performance and usage metrics. Users can log requests, responses, and performance statistics to ensure their models are functioning optimally.

  • Containerization Support: ML Deploy Lite provides utilities for containerizing machine learning models using Docker, facilitating easy deployment across various environments, including cloud platforms and on-premises servers.

  • Configuration Management: Users can easily configure deployment settings, such as model paths, API endpoints, and logging preferences, through a simple configuration file, allowing for flexible and customizable deployments.

  • Integration with Popular Frameworks: The library is designed to work seamlessly with popular machine learning frameworks like TensorFlow, PyTorch, and Scikit-learn, making it a versatile choice for developers.

Getting Started:

  1. Prepare Your Model: Ensure you have a trained machine learning model saved in a format compatible with joblib. For example:

    import joblib
    from sklearn.datasets import load_iris
    from sklearn.ensemble import RandomForestClassifier
    
    iris = load_iris()
    X, y = iris.data, iris.target
    model = RandomForestClassifier()
    model.fit(X, y)
    joblib.dump(model, 'model/sample_model.pkl')
    
  2. Deploy Your Model: Use the MLDeployLite class to deploy your model:

    from ml_deploy_lite import MLDeployLite
    
    deployer = MLDeployLite('model/sample_model.pkl')
    deployer.run()
    
  3. Making Predictions: Send a POST request to the /predict endpoint:

    curl -X POST http://localhost:5000/predict -H "Content-Type: application/json" -d '{"features": [5.1, 3.5, 1.4, 0.2]}'
    
  4. Monitoring and Logging: The library automatically logs incoming requests and predictions. You can customize the logging level in the setup_logging method.

  5. Docker Integration: To create a Docker image for your application, use the provided create_dockerfile function in ml_deploy_lite/docker.py.

  6. Kubernetes Integration: To create a Kubernetes deployment configuration, use the create_k8s_deployment function in ml_deploy_lite/k8s.py.

Conclusion:

The ML Deploy Lite Library is designed to make the deployment of machine learning models straightforward and efficient. With its robust features and easy-to-use interface, you can quickly turn your models into production-ready services. For more information, check the GitHub repository for documentation and updates: https://github.com/Blacksujit/ML-Deploy-Lite.git

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_deploy_lite-0.6.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

ml_deploy_lite-0.6-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ml_deploy_lite-0.6.tar.gz.

File metadata

  • Download URL: ml_deploy_lite-0.6.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for ml_deploy_lite-0.6.tar.gz
Algorithm Hash digest
SHA256 6bd6a2a05b0c4c44df0a6c2b2c597db8c461a0707342a337489413c885d9ab1f
MD5 ed89873b267cb330f9816ac2cb8b4a3b
BLAKE2b-256 685eebad8449ceb9c7851dcbf635ebcb4199186f7952ddc8e960b648ee2b2a7e

See more details on using hashes here.

File details

Details for the file ml_deploy_lite-0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for ml_deploy_lite-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 763e324a8dca9b5a180073f32b5a8a007566864a0d5fa4742d82807de85e4b32
MD5 aa552648d18ae140d4104d4aa2a9ad39
BLAKE2b-256 0069cb5cad46453c03d845f5e718128267d857aa2116581551c6d65dd1f1d97c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page