slg-nimrod


Nameslg-nimrod JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/slegroux/nimrod
Summaryminimal deep learning framework
upload_time2024-08-27 22:06:57
maintainerNone
docs_urlNone
authorSylvain Le Groux
requires_python>=3.9
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nimrod

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

[![python](https://img.shields.io/badge/-Python_3.7_%7C_3.8_%7C_3.9_%7C_3.10-blue?logo=python&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![pytorch](https://img.shields.io/badge/PyTorch_1.10+-ee4c2c?logo=pytorch&logoColor=white)](https://pytorch.org/get-started/locally/)
[![hydra](https://img.shields.io/badge/Config-Hydra_1.3-89b8cd)](https://hydra.cc/)
[![pre-commit](https://img.shields.io/badge/Pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white.png)](https://github.com/pre-commit/pre-commit)

## Description

This is a repo with minimal tooling, modules, models and recipes to get
easily get started with deep learning training and experimentation with
an emphasis on speech, audio and language modeling.

## Install

you need python \<3.12

### Install using Pip

Install package:
``` sh
pip install slg-nimrod
```
Install espeak for LM:
```bash
brew install espeak #macos
```
Install Spacy english model
```bash
python -m spacy download en_core_web_sm
```


## Usage

Download test data on which to run example recipes:

```bash
# if not already installed on your system
git lfs install 
# update changes
git lfs fetch --all
# copy the actual data
git lfs checkout
# or just
git lfs pull # combing both steps above into one (like usual git pull)
```

Check recipes in `recipes/` folder. E.g. for a simple digit recognizer
on MNIST:

``` bash
git clone https://github.com/slegroux/nimrod.git
cd nimrod/recipes/images/mnist
python train.py datamodule.num_workers=8 trainer.max_epochs=20 trainer.accelerator='mps' loggers='tensorboard'
head conf/train.yaml
```

All the parameters of the experiment are editable and read from a .yaml
file which details:

- data and logging directory paths
- data module with data source path and batching parameters
- model architecture
- trainer with hardware acceleration and number of epochs
- callbacks for early stopping and automatic logging to Wandb

## Docker

You might want to use docker containers for reproductible development
environment or run your project in the cloud

``` bash
make container
docker pull slegroux/nimrod
docker run -it --rm -p 8888:8888 slegroux/nimrod /bin/bash
```

You can also use docker-compose to define services and volumes

``` bash
cd .devcontainer
docker-compose up
docker-compose down
```

## Develop

``` bash
pip install -e .
```

## Hyperparameter tuning

to compare training results on different model parameters:

``` bash
cd nimrod/recipes/images/mnist
python train.py --multirun model.n_h=16,64,256 loggers='tensorboard' trainer.max_epochs=5
```

## Server

### st webapp

Run a simple digit recognizer webapp with GUI

``` bash
cd server
./run_st_app.sh
```

## Authors

2023 Sylvain Le Groux <sylvain.legroux@gmail.com>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/slegroux/nimrod",
    "name": "slg-nimrod",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "nbdev jupyter notebook python",
    "author": "Sylvain Le Groux",
    "author_email": "slegroux@ccrma.stanford.edu",
    "download_url": "https://files.pythonhosted.org/packages/95/d5/69e38a67f0e744ab2edf642ad7c339cf31db73f52a0c13315225c3e4b07d/slg_nimrod-0.0.11.tar.gz",
    "platform": null,
    "description": "# Nimrod\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n[![python](https://img.shields.io/badge/-Python_3.7_%7C_3.8_%7C_3.9_%7C_3.10-blue?logo=python&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![pytorch](https://img.shields.io/badge/PyTorch_1.10+-ee4c2c?logo=pytorch&logoColor=white)](https://pytorch.org/get-started/locally/)\n[![hydra](https://img.shields.io/badge/Config-Hydra_1.3-89b8cd)](https://hydra.cc/)\n[![pre-commit](https://img.shields.io/badge/Pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white.png)](https://github.com/pre-commit/pre-commit)\n\n## Description\n\nThis is a repo with minimal tooling, modules, models and recipes to get\neasily get started with deep learning training and experimentation with\nan emphasis on speech, audio and language modeling.\n\n## Install\n\nyou need python \\<3.12\n\n### Install using Pip\n\nInstall package:\n``` sh\npip install slg-nimrod\n```\nInstall espeak for LM:\n```bash\nbrew install espeak #macos\n```\nInstall Spacy english model\n```bash\npython -m spacy download en_core_web_sm\n```\n\n\n## Usage\n\nDownload test data on which to run example recipes:\n\n```bash\n# if not already installed on your system\ngit lfs install \n# update changes\ngit lfs fetch --all\n# copy the actual data\ngit lfs checkout\n# or just\ngit lfs pull # combing both steps above into one (like usual git pull)\n```\n\nCheck recipes in `recipes/` folder. E.g. for a simple digit recognizer\non MNIST:\n\n``` bash\ngit clone https://github.com/slegroux/nimrod.git\ncd nimrod/recipes/images/mnist\npython train.py datamodule.num_workers=8 trainer.max_epochs=20 trainer.accelerator='mps' loggers='tensorboard'\nhead conf/train.yaml\n```\n\nAll the parameters of the experiment are editable and read from a .yaml\nfile which details:\n\n- data and logging directory paths\n- data module with data source path and batching parameters\n- model architecture\n- trainer with hardware acceleration and number of epochs\n- callbacks for early stopping and automatic logging to Wandb\n\n## Docker\n\nYou might want to use docker containers for reproductible development\nenvironment or run your project in the cloud\n\n``` bash\nmake container\ndocker pull slegroux/nimrod\ndocker run -it --rm -p 8888:8888 slegroux/nimrod /bin/bash\n```\n\nYou can also use docker-compose to define services and volumes\n\n``` bash\ncd .devcontainer\ndocker-compose up\ndocker-compose down\n```\n\n## Develop\n\n``` bash\npip install -e .\n```\n\n## Hyperparameter tuning\n\nto compare training results on different model parameters:\n\n``` bash\ncd nimrod/recipes/images/mnist\npython train.py --multirun model.n_h=16,64,256 loggers='tensorboard' trainer.max_epochs=5\n```\n\n## Server\n\n### st webapp\n\nRun a simple digit recognizer webapp with GUI\n\n``` bash\ncd server\n./run_st_app.sh\n```\n\n## Authors\n\n2023 Sylvain Le Groux <sylvain.legroux@gmail.com>\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "minimal deep learning framework",
    "version": "0.0.11",
    "project_urls": {
        "Homepage": "https://github.com/slegroux/nimrod"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e6ec95c949890b1d0010e5161894f4359ed51414ea23292a4aec4369c246c82",
                "md5": "278d7a6c79b785b2330e9b35ecdd64a1",
                "sha256": "c2d45dc68f53b6f090125198944f4812a7db8dd95793f423667da9a9b6176f0b"
            },
            "downloads": -1,
            "filename": "slg_nimrod-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "278d7a6c79b785b2330e9b35ecdd64a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 82035,
            "upload_time": "2024-08-27T22:06:55",
            "upload_time_iso_8601": "2024-08-27T22:06:55.875799Z",
            "url": "https://files.pythonhosted.org/packages/3e/6e/c95c949890b1d0010e5161894f4359ed51414ea23292a4aec4369c246c82/slg_nimrod-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95d569e38a67f0e744ab2edf642ad7c339cf31db73f52a0c13315225c3e4b07d",
                "md5": "24414426bcc602baa60998d8691c02d6",
                "sha256": "a014813ce14ca7324ca900ec4b2507089a5b590820d1c93b86385ad4c8e0f0a7"
            },
            "downloads": -1,
            "filename": "slg_nimrod-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "24414426bcc602baa60998d8691c02d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 65616,
            "upload_time": "2024-08-27T22:06:57",
            "upload_time_iso_8601": "2024-08-27T22:06:57.515554Z",
            "url": "https://files.pythonhosted.org/packages/95/d5/69e38a67f0e744ab2edf642ad7c339cf31db73f52a0c13315225c3e4b07d/slg_nimrod-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 22:06:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "slegroux",
    "github_project": "nimrod",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "slg-nimrod"
}
        
Elapsed time: 0.63415s