chore: bump version to 1.0.22
This commit is contained in:
parent
042a6b9126
commit
3143424b18
49
DOCS.md
49
DOCS.md
@ -7,3 +7,52 @@ While numerous tools are available for training machine learning models, many li
|
||||
|
||||
**[mlModelSaver](https://github.com/smartdev-ca/mlModelSaver)** fills this gap, offering an intuitive way to save machine learning models and transformers. It facilitates seamless integration with frameworks like FastAPI ([Examples](https://github.com/jafarijason/ml_models_deployments)), Flask, and Django, enabling easy deployment and serving of models in production environments. Empower your machine learning workflow with **mlModelSaver** – the easy and efficient tool for model management.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install **mlModelSaver** via pip:
|
||||
|
||||
```bash
|
||||
pip install mlModelSaver
|
||||
```
|
||||
|
||||
|
||||
# mlModelSaver Example: Simple Linear Regression
|
||||
|
||||
In this example, we demonstrate how to use **mlModelSaver** to export a simple linear regression model based on a notebook from [ml_models_deployments](https://github.com/jafarijason/ml_models_deployments/blob/master/notebooks/001.ipynb).
|
||||
|
||||
### Example Description
|
||||
|
||||
This example builds a simple linear regression model to predict sales based on temperature, advertising, and discount factors. Once the model is fitted and satisfactory, **mlModelSaver** allows you to easily save and deploy the model for use in production environments.
|
||||
|
||||
### Example Code - notebook available [here](https://github.com/jafarijason/ml_models_deployments/blob/master/notebooks/001.ipynb)
|
||||
|
||||
|
||||
```python
|
||||
def add_constant_columnTransformer(df):
|
||||
# example transformer
|
||||
df_with_const = df.copy()
|
||||
df_with_const.insert(0, 'const', 1)
|
||||
return df_with_const
|
||||
|
||||
# Export the model using MlModelSaver
|
||||
loadedModel = mlModelSaverInstance.exportModel(
|
||||
simpleLinearRegressionFittedModel, # the models is fitted and ready for usage
|
||||
{
|
||||
"modelName": "modelPredictSaleByTemperatureAdvertisingDiscountFit",
|
||||
"description": "Example model predicting sales based on temperature, advertising, and discount.",
|
||||
"modelType": "sm.OLS", # Example model type (replace with actual type)
|
||||
"inputs": [
|
||||
{"name": "Temperature", "type": "float"},
|
||||
{"name": "Advertising", "type": "float"},
|
||||
{"name": "Discount", "type": "float"}
|
||||
],
|
||||
"transformer": add_constant_columnTransformer, # Use your transformation function here
|
||||
"outputs": [
|
||||
{
|
||||
"name": "Sales",
|
||||
"type": "float"
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mlModelSaver",
|
||||
"version": "1.0.21",
|
||||
"version": "1.0.22",
|
||||
"description": "Make life easier for save and serving ml models",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:smartdev-ca/mlModelSaver.git",
|
||||
|
||||
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='mlModelSaver',
|
||||
version='1.0.21',
|
||||
version='1.0.22',
|
||||
packages=find_packages(),
|
||||
description='Make life easier for saving and serving ML models',
|
||||
long_description=open('DOCS.md').read(), # Assumes you have a README.md file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user