mltemplate


Namemltemplate JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/sowmyay/ml-project-template
SummaryTemplating tool with boiler plate code for building robust machine learning projects in python.
upload_time2023-10-08 17:48:00
maintainer
docs_urlNone
authorSowmya Yellapragada
requires_python>=3.7,<4.0
licenseMIT
keywords template machine learning pytorch deep learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 -
```markdown
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
```bash
poetry build
```

Install the library from the generated whl file using
```bash
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
```bash
git tag <x.x.x>
git push origin <x.x.x>
```
## License
Copyright © 2020 Sowmya Yellapragada

Distributed under the MIT License (MIT).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sowmyay/ml-project-template",
    "name": "mltemplate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "template,machine learning,pytorch,deep learning",
    "author": "Sowmya Yellapragada",
    "author_email": "sowmyayellapragada@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/98/d9/29f38ef5fd7f39769281c218976f85e9327132a98ef9097437f771d7dec6/mltemplate-1.0.4.tar.gz",
    "platform": null,
    "description": "# ML Template\n\nML template is an easy-to-use tool to automate the boilerplate code for most machine learning projects.\n\nThis tool creates a user-oriented project architecture for machine learning projects.\n\nModify the code under `#TODO` comments in the template project repository to easily adapt the template to your use-case.\n\n# How to use it?\n1. Install the package as - `pip install mltemplate`\n2. Then, simply run `mltempate <project-name>` from your terminal to create your template\n\nAnd Voila!\n\nThis creates a project directory in your current folder similar to -\n```markdown\ntemplate\n\u251c\u2500\u2500 Dockerfile.cpu\n\u251c\u2500\u2500 Dockerfile.gpu\n\u251c\u2500\u2500 LICENSE.md\n\u251c\u2500\u2500 Makefile\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 jupyter.sh\n\u251c\u2500\u2500 requirements.txt\n\u2514\u2500\u2500 template\n    \u251c\u2500\u2500 __init__.py\n    \u251c\u2500\u2500 __main__.py\n    \u251c\u2500\u2500 cli\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 predict.py\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 train.py\n    \u251c\u2500\u2500 notebooks\n    \u2514\u2500\u2500 src\n        \u251c\u2500\u2500 __init__.py\n        \u251c\u2500\u2500 models.py\n        \u251c\u2500\u2500 datasets.py\n        \u2514\u2500\u2500 transforms.py\n```\nAll you have to do next is -\n1. Update python frameworks and versions in `template/requirements.txt` as need for your project\n2. Head to `template/datasets.py` and modify create a new dataset that will work for your use case\n3. Navigate to `template/models.py` and create a new model class with your sota (or not) architecture\n4. In `template/transforms.py` add transforms such as Normalizer, Denormalize etc.\n5. Follow the `TODO` steps in `template/cli/train.py` and `template/cli/predict.py` to make the necessary changes\n\nCheckout the `README.md` in the `template` directory for further instructions on how to train, predict and also monitor your loss plots using tensor board.\n\n# Future Work\nCurrently, this package only supports boilerplate creation for ML projects in `pytorch`\n\nWe plan to support `keras` in the future.\n\n# Development\n\n## Local Testing\nRun the following command to generate the packaged library\n```bash\npoetry build\n```\n\nInstall the library from the generated whl file using\n```bash\npip3 install dist/mltemplate-<version>-py3-none-any.whl --force-reinstall\n```\nYou can then test the functionality of the pypi package.\n\n## Publish package to PyPi\nTo create a new version of the framework, update the version in `pyproject.toml` file\nMerge your changes to main and then publish git tag to trigger the release ci\n```bash\ngit tag <x.x.x>\ngit push origin <x.x.x>\n```\n## License\nCopyright \u00a9 2020 Sowmya Yellapragada\n\nDistributed under the MIT License (MIT).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Templating tool with boiler plate code for building robust machine learning projects in python.",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/sowmyay/ml-project-template",
        "Repository": "https://github.com/sowmyay/ml-project-template"
    },
    "split_keywords": [
        "template",
        "machine learning",
        "pytorch",
        "deep learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eba1bb4d772d207d1463d491ba93b25120b1cbb2a18aee447ac89d4cdbd2d3e3",
                "md5": "c001cbfeceda3e20cbcd213213a8028f",
                "sha256": "79bf6da3652c42d335685b5afc35c7c5f2ce2ed5e7b2e6df8f507c00e944b0c7"
            },
            "downloads": -1,
            "filename": "mltemplate-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c001cbfeceda3e20cbcd213213a8028f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 15712,
            "upload_time": "2023-10-08T17:47:59",
            "upload_time_iso_8601": "2023-10-08T17:47:59.247289Z",
            "url": "https://files.pythonhosted.org/packages/eb/a1/bb4d772d207d1463d491ba93b25120b1cbb2a18aee447ac89d4cdbd2d3e3/mltemplate-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98d929f38ef5fd7f39769281c218976f85e9327132a98ef9097437f771d7dec6",
                "md5": "57ca0e65a258e75e87abe57b573c76c4",
                "sha256": "4e54fd2a0900cdb9c8c08357a6487a1231d9ddce10eda8d24ef5c9ad6f56641d"
            },
            "downloads": -1,
            "filename": "mltemplate-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "57ca0e65a258e75e87abe57b573c76c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 9154,
            "upload_time": "2023-10-08T17:48:00",
            "upload_time_iso_8601": "2023-10-08T17:48:00.846335Z",
            "url": "https://files.pythonhosted.org/packages/98/d9/29f38ef5fd7f39769281c218976f85e9327132a98ef9097437f771d7dec6/mltemplate-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-08 17:48:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sowmyay",
    "github_project": "ml-project-template",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mltemplate"
}
        
Elapsed time: 0.19330s