Skip to main content

minimal deep learning framework

Project description

Nimrod

python pytorch hydra 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:

pip install slg-nimrod

Install espeak for LM:

brew install espeak #macos

Install Spacy english model

python -m spacy download en_core_web_sm

Usage

Download test data on which to run example recipes:

# 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:

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

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

cd .devcontainer
docker-compose up
docker-compose down

Develop

pip install -e .

Hyperparameter tuning

to compare training results on different model parameters:

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

cd server
./run_st_app.sh

Authors

2023 Sylvain Le Groux sylvain.legroux@gmail.com

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

slg_nimrod-0.0.10.tar.gz (65.7 kB view details)

Uploaded Source

Built Distribution

slg_nimrod-0.0.10-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file slg_nimrod-0.0.10.tar.gz.

File metadata

  • Download URL: slg_nimrod-0.0.10.tar.gz
  • Upload date:
  • Size: 65.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for slg_nimrod-0.0.10.tar.gz
Algorithm Hash digest
SHA256 94b6389c4314c184459092e67500d794bc29ac276e8d9833d9e88b3f70750e02
MD5 861040f93221e5cdc00c01081e404c4d
BLAKE2b-256 8ddeec4eb365b76bca74f70886561b97115939aa09b6ca3545a99f4be7efbcb7

See more details on using hashes here.

File details

Details for the file slg_nimrod-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: slg_nimrod-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for slg_nimrod-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 fb520f25107a89f60c4a4f7e0c626938b1c890e826a206a04a4571835b6e1f53
MD5 c756cf62ee0a4d452d2a1263f2345f0f
BLAKE2b-256 f5a93999b07db029950cf437eea640e1e240e245e7324737ee0cbab40bae0bf4

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