ML Template
ML template is an easy-to-use tool to automate the boilerplate code for most machine learning projects.
This tool creates a user-oriented project architecture for machine learning projects.
Modify the code under #TODO comments in the template project repository to easily adapt the template to your use-case.
How to use it?
- Install the package as -
pip install mltemplate - Then, simply run
mltempate <project-name>from your terminal to create your template
And Voila!
This creates a project directory in your current folder similar to -
template
├── Dockerfile.cpu
├── Dockerfile.gpu
├── LICENSE.md
├── Makefile
├── README.md
├── jupyter.sh
├── requirements.txt
└── template
├── __init__.py
├── __main__.py
├── cli
│ ├── __init__.py
│ ├── predict.py
│ └── train.py
├── notebooks
└── src
├── __init__.py
├── models.py
├── datasets.py
└── transforms.py
All you have to do next is -
- Update python frameworks and versions in
template/requirements.txtas need for your project - Head to
template/datasets.pyand modify create a new dataset that will work for your use case - Navigate to
template/models.pyand create a new model class with your sota (or not) architecture - In
template/transforms.pyadd transforms such as Normalizer, Denormalize etc. - Follow the
TODOsteps intemplate/cli/train.pyandtemplate/cli/predict.pyto make the necessary changes
Checkout the README.md in the template directory for further instructions on how to train, predict and also monitor your loss plots using tensor board.
Future Work
Currently, this package only supports boilerplate creation for ML projects in pytorch
We plan to support keras in the future.
Development
Local Testing
Run the following command to generate the packaged library
poetry build
Install the library from the generated whl file using
pip3 install dist/mltemplate-<version>-py3-none-any.whl --force-reinstall
You can then test the functionality of the pypi package.
Publish package to PyPi
To create a new version of the framework, update the version in pyproject.toml file
Merge your changes to main and then publish git tag to trigger the release ci
git tag <x.x.x>
git push origin <x.x.x>
License
Copyright © 2020 Sowmya Yellapragada
Distributed under the MIT License (MIT).
Metadata
Release files for mltemplate 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mltemplate-1.0.4.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mltemplate-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.9 kB
Release files / mltemplate-1.0.4.tar.gz
| Download URL | mltemplate-1.0.4.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e54fd2a0900cdb9c8c08357a6487a1231d9ddce10eda8d24ef5c9ad6f56641d
|
|
BLAKE2b-256 checksum How to use checksums |
98d929f38ef5fd7f39769281c218976f85e9327132a98ef9097437f771d7dec6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1012-azure
|
Release files / mltemplate-1.0.4-py3-none-any.whl
| Download URL | mltemplate-1.0.4-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79bf6da3652c42d335685b5afc35c7c5f2ce2ed5e7b2e6df8f507c00e944b0c7
|
|
BLAKE2b-256 checksum How to use checksums |
eba1bb4d772d207d1463d491ba93b25120b1cbb2a18aee447ac89d4cdbd2d3e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1012-azure
|