Skip to main content

Templating tool with boiler plate code for building robust machine learning projects in python.

Project description

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?

  1. Install the package as - pip install mltemplate
  2. 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 -

  1. Update python frameworks and versions in template/requirements.txt as need for your project
  2. Head to template/datasets.py and modify create a new dataset that will work for your use case
  3. Navigate to template/models.py and create a new model class with your sota (or not) architecture
  4. In template/transforms.py add transforms such as Normalizer, Denormalize etc.
  5. Follow the TODO steps in template/cli/train.py and template/cli/predict.py to 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).

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

mltemplate-1.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

mltemplate-1.0.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file mltemplate-1.0.3.tar.gz.

File metadata

  • Download URL: mltemplate-1.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1012-azure

File hashes

Hashes for mltemplate-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c1ead9c917735083553746070772a6b4057c3378dd481401de8703794e855f11
MD5 b1fbf0a3b75aad2d22318132e35b51b8
BLAKE2b-256 4ba9bcd71b93b14e6787c42efd3c5e834ba647a9bd62e08324606d95d2f90c88

See more details on using hashes here.

File details

Details for the file mltemplate-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mltemplate-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1012-azure

File hashes

Hashes for mltemplate-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e0be8d481bb2ae82e60dddb32059ebf9ec866d2b26872358e74b5e16bf3b2730
MD5 49d2703707749f6630327eb57ef4659f
BLAKE2b-256 9b5494a42a01248fd66694b102057a0620078c999d8ef7b68e962f985255ed74

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