For handling binary machine learning models in mongodb
Project description
Mongodb ML Model Managing
Mongodb can store machine learning binary models. Using this package ml models can be versioned. Also, possible to modify existing version. When the version is available the package use the local model. If packages are not available in the local storage, it will download.
Requires python 3.8+
Mongodb:
Prediction Model management
-
Models are stored in mongodb
-
Config setting
mongodb.model
for settings -
Uploading model
- Model name in db has 3 part
- First part project name
- Second part model name (should be unique)
- Third version number
- If model name exist in db
- Delete it automatically
- Insert new model
- Model name in db has 3 part
-
Downloading model
- If file exist in the local, file will be reused, discard the downloading
- File will be saved in
/ml/model/modele_name/version
-
Adding new model
- Create a class name in config file
- Format
model.class_name
- Required attributes
name
version
- Format
- Create a class name in config file
-
Usage
-
Importing package
from mongodb_ml_models import ManageModel
- ManageModel.get_model()
- ManageModel.upload_model()
- ManageModel.get_model_versions()
- upload_model(binary_model, model_class)
- model_class is the reference name in config file for mapping
- Model will be saved in mongodb
- Model will be saved in local path, ml/model/model_name/version (model name and model version should mention in config)
- get_model(model_class)
- Check for local path (ml/model/model_name/version)
- If not available then download from db
- get_model_versions(model_class)
- It lists out all the available versions
-
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mongodb_ml_models-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2edcfd16b6fdc3ceb5dbe3477b68f16591a2c1974cf3e75759bd55ba7f8cdf6 |
|
MD5 | 0cb86a3cf68cf133f993ab142a22c1f7 |
|
BLAKE2b-256 | 60c03a72e463e2867d78db58ebed41755e6cb4e8fbfa7a7b0ac02529f20746f1 |