Lightning-Hydra-Cookiecutter
A clean template to kickstart your deep learning project πβ‘π₯
Suggestions are always welcome!
π Quickstart
If you don't already have cookiecutter installed, use either of the following tools to add it to your PATH
:
python3 -m pip install --user cookiecutter
conda install -c conda-forge cookiecutter
pipx install cookiecutter
brew install cookiecutter # macOS only
Now you can generate a new project from this template with a one-liner. Note that you will be asked for a few things like the project name, open source license, etc. to bootstrap the project.
cookiecutter https://github.com/y1zhou/lightning-hydra-cookiecutter
Project Structure
The directory structure of new project looks like this:
βββ docs <- A default MkDocs project; see www.mkdocs.org for details
β
βββ data <- Project data
β βββ external <- Data from third party sources.
β βββ raw <- The original, immutable data dump.
β βββ interim <- Intermediate data that has been transformed.
β βββ processed <- The final, canonical data sets for modeling.
β
βββ references <- Data dictionaries, manuals, and all other explanatory materials.
β
βββ notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
β the creator's initials, and a short `-` delimited description,
β e.g. `1.0-jqp-initial-data-exploration.ipynb`.
β
βββ reports <- Generated analysis as HTML, PDF, LaTeX, etc.
β βββ figures <- Generated graphics and figures to be used in reporting
β
βββ configs <- Hydra configs
β βββ callbacks <- Callbacks configs
β βββ data <- Data configs
β βββ debug <- Debugging configs
β βββ experiment <- Experiment configs
β βββ extras <- Extra utilities configs
β βββ hparams_search <- Hyperparameter search configs
β βββ hydra <- Hydra configs
β βββ local <- Local configs
β βββ logger <- Logger configs
β βββ model <- Model configs
β βββ paths <- Project paths configs
β βββ trainer <- Trainer configs
β β
β βββ eval.yaml <- Main config for evaluation
β βββ train.yaml <- Main config for training
β
βββ src <- Source code
β βββ data <- Data scripts
β βββ models <- Model scripts
β βββ utils <- Utility scripts
β β
β βββ eval.py <- Run evaluation
β βββ train.py <- Run training
β
βββ logs <- Logs generated by hydra and lightning loggers
β
βββ tests <- Tests of any kind
β
βββ .env.example <- Example of file for storing private environment variables
βββ .gitignore <- List of files ignored by git
βββ .pre-commit-config.yaml <- Configuration of pre-commit hooks for code formatting
βββ .project-root <- File for inferring the position of project root directory
βββ environment.yaml <- File for installing conda environment
βββ Makefile <- Makefile with commands like `make train` or `make test`
βββ pyproject.toml <- Configuration options for package information, testing, and linting
βββ README.md
Resources
This template was inspired by: