## Auto MLFlow
Your automated MLOps library for MLFlow.
### Installation
- Install MLFlow.
```
pip3 install mlflow
```
- Install Auto MLFlow.
```
pip3 install auto_mlflow
```
#### Working Demonstration:
- Start a MLFlow Server.
```
mlflow server --host 127.0.0.1 --port 5555
```
- Use Auto MLFlow to log model and experiment related information.
```python
import auto_mlflow
user_name = "Ravin Kumar"
project_name = "Object Detection"
experiment_name = "Using Yolo approach"
runName = "using yolov3"
total_epochs = 30
mlflow_server_uri = "http://127.0.0.1:5555" # IP address of the MLFlow Server.
# initialisation
auto_mlflow.init_run(user_name, project_name, experiment_name, runName, mlflow_server_uri) # project, experiment, and run is created
# below this line, whatever is printed in the terminal will also get logged in the MLFlow inside the file log.txt
auto_mlflow.write_param(param_dict={"learning_rate": "0.001", "total_epochs": str(total_epochs)}) # save training related information
# storing train, val, and test loss values
model_architecture = get_model_architecture()
for epoch in range(total_epochs):
train_loss = ...
valid_loss = ...
test_loss = ...
metric_dict={"train_loss": train_loss, "valid_loss": valid_loss, "test_loss": test_loss}
auto_mlflow.write_metric(metric_dict, step = epoch)
# storing an image in MLFlow Server
numpy_array_bgr = visualised_image(.....)
auto_mlflow.write_image(numpy_array_bgr, image_name="image.jpg")
# storing text in a file inside MLFlow Server
auto_mlflow.write_text(filename="additional_file.txt", filedata="object detection model")
# storing already existing local file inside MLFlow Server
# example- incase one wants to save only weights, and not rely on model registry. This will get saved inside weights/ in MLFlow Sever
auto_mlflow.write_files("yolo_weights.pth", filepath="weights")
# storing an entire directory present in local system, to the MLFlow Server
auto_mlflow.write_directory("./other_data", mlflow_dir_path="artifacts") # this will copy all the content of ./other_data to MLFlow inside artifacts/
# Logging a model
auto_mlflow.log_model(model_architecture, model_run_path="models") # the logged model can be used for model registry
auto_mlflow.end_run() # all the information is successfully saved.
# complete
```
LICENSE
```
Copyright (c) 2024 Ravin Kumar
Website: https://mr-ravin.github.io
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
Raw data
{
"_id": null,
"home_page": "http://github.com/mr-ravin/auto_mlflow",
"name": "auto-mlflow",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "MLFlow, MLOps, Deep Learning, Automation",
"author": "Ravin Kumar",
"author_email": "mr.ravin_kumar@hotmail.com",
"download_url": null,
"platform": null,
"description": "## Auto MLFlow\nYour automated MLOps library for MLFlow.\n\n### Installation\n- Install MLFlow.\n ```\n pip3 install mlflow\n ```\n- Install Auto MLFlow.\n ```\n pip3 install auto_mlflow\n ```\n\n#### Working Demonstration:\n- Start a MLFlow Server.\n ``` \n mlflow server --host 127.0.0.1 --port 5555\n ```\n- Use Auto MLFlow to log model and experiment related information.\n ```python\n import auto_mlflow\n user_name = \"Ravin Kumar\"\n project_name = \"Object Detection\"\n experiment_name = \"Using Yolo approach\"\n runName = \"using yolov3\"\n total_epochs = 30\n mlflow_server_uri = \"http://127.0.0.1:5555\" # IP address of the MLFlow Server.\n \n # initialisation \n auto_mlflow.init_run(user_name, project_name, experiment_name, runName, mlflow_server_uri) # project, experiment, and run is created\n \n # below this line, whatever is printed in the terminal will also get logged in the MLFlow inside the file log.txt\n auto_mlflow.write_param(param_dict={\"learning_rate\": \"0.001\", \"total_epochs\": str(total_epochs)}) # save training related information\n \n # storing train, val, and test loss values\n model_architecture = get_model_architecture()\n for epoch in range(total_epochs):\n train_loss = ...\n valid_loss = ...\n test_loss = ...\n metric_dict={\"train_loss\": train_loss, \"valid_loss\": valid_loss, \"test_loss\": test_loss}\n auto_mlflow.write_metric(metric_dict, step = epoch)\n \n # storing an image in MLFlow Server\n numpy_array_bgr = visualised_image(.....)\n auto_mlflow.write_image(numpy_array_bgr, image_name=\"image.jpg\")\n \n # storing text in a file inside MLFlow Server\n auto_mlflow.write_text(filename=\"additional_file.txt\", filedata=\"object detection model\")\n \n # storing already existing local file inside MLFlow Server\n # example- incase one wants to save only weights, and not rely on model registry. This will get saved inside weights/ in MLFlow Sever\n auto_mlflow.write_files(\"yolo_weights.pth\", filepath=\"weights\")\n \n # storing an entire directory present in local system, to the MLFlow Server\n auto_mlflow.write_directory(\"./other_data\", mlflow_dir_path=\"artifacts\") # this will copy all the content of ./other_data to MLFlow inside artifacts/\n \n # Logging a model\n auto_mlflow.log_model(model_architecture, model_run_path=\"models\") # the logged model can be used for model registry\n \n auto_mlflow.end_run() # all the information is successfully saved.\n # complete \n ```\n\nLICENSE\n```\nCopyright (c) 2024 Ravin Kumar\nWebsite: https://mr-ravin.github.io\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation \nfiles (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, \nmodify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the \nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the \nSoftware.\n\nTHE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE \nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR \nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, \nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "An opensource automated MLOps library for MLFlow in python.",
"version": "1.1",
"project_urls": {
"Homepage": "http://github.com/mr-ravin/auto_mlflow"
},
"split_keywords": [
"mlflow",
" mlops",
" deep learning",
" automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62681c031c0782696b25d7f1c0aee6362d842f0762ff029297295427f79760e3",
"md5": "36d56c9f31de1259bfe7e214338eff44",
"sha256": "f26221da1468ff52f2049d51dc680664ab4ce1c866ac68740eade354083b59a8"
},
"downloads": -1,
"filename": "auto_mlflow-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36d56c9f31de1259bfe7e214338eff44",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4954,
"upload_time": "2024-04-04T13:45:06",
"upload_time_iso_8601": "2024-04-04T13:45:06.844931Z",
"url": "https://files.pythonhosted.org/packages/62/68/1c031c0782696b25d7f1c0aee6362d842f0762ff029297295427f79760e3/auto_mlflow-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-04 13:45:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mr-ravin",
"github_project": "auto_mlflow",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "mlflow",
"specs": [
[
"==",
"2.9.2"
]
]
},
{
"name": "opencv_contrib_python",
"specs": [
[
"==",
"4.7.0.72"
]
]
},
{
"name": "opencv_python",
"specs": [
[
"==",
"4.7.0.72"
]
]
},
{
"name": "opencv_python_headless",
"specs": [
[
"==",
"4.8.0.74"
]
]
}
],
"lcname": "auto-mlflow"
}