Skip to content

Releases: ashleve/lightning-hydra-template

v2.0.3

01 Sep 20:23
2654bad
Compare
Choose a tag to compare

What's Changed

  • Lightning + Aim dependency fix in conda environment.yaml and setup.py by @tesfaldet in #575
  • Lightning import fix in instantiators.py by @tesfaldet in #577
  • Fix WandB config improper hierarchical display of keys by @dreaquil in #583
  • Removing yaml extension from hydra config names in defaults lists by @tesfaldet in #584
  • Docstrings revamp by @tesfaldet in #589
  • Rename pyrootutils to rootutils by @ashleve in #592
  • Fixes colorlog issue where train.log is saved in project root dir by @tesfaldet in #588
  • Fix accelerator in tests/test_train.py by @caplett in #595
  • Update PyTorch Lightning DDP Documentation Links in README.md by @amorehead in #601
  • Fix torch.compile on nn.module instead of on LightningModule by @tesfaldet in #587

New Contributors

Full Changelog: v2.0.2...v2.0.3

v2.0.2

02 May 20:05
8886a13
Compare
Choose a tag to compare

What's Changed

  • Set strategy to ddp in ddp config by @ashleve in #571
  • Set sync_dist=True when logging best so far validation accuracy by @ashleve in #572

Full Changelog: v2.0.1...v2.0.2

v2.0.1

30 Mar 17:01
8919406
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.0.1

v2.0.0

18 Mar 20:34
df6a17f
Compare
Choose a tag to compare

Release for alignment with PyTorch 2.0 and Lightning 2.0.

Changes

🚀 Features

🧹 Maintenance

📝️ Documentation

Full Changelog: v1.5.3...v2.0.0

v1.5.3

08 Mar 23:53
adc6afe
Compare
Choose a tag to compare

Changes

🚀 Features

  • Add __init__.py to configs/ folder @ashleve (#539)
  • Support for installing dependencies with conda @tesfaldet (#532)
  • Encourage resetting all validation metrics when training starts @ashleve (#540)

🧹 Maintenance

v1.5.2

11 Feb 01:30
ed7dea4
Compare
Choose a tag to compare

Changes

🧹 Maintenance

📝️ Documentation

v1.5.1

14 Jan 15:03
24b937c
Compare
Choose a tag to compare

Changes

🧹 Maintenance

📝️ Documentation

v1.5.0

01 Jan 22:53
37b57ce
Compare
Choose a tag to compare

Changes

🚀 Features

  • Add release drafter (#493)
  • Add codecov.yml to prevent failing CI pipeline on coverage decrease (#484)
  • Add learning rate scheduler example (#439)
  • Make use of learning rate scheduler optional (#449)
  • Add shellcheck linter (#427)

🐛 Bug Fixes

  • Fix sending hparams to only one logger (#479)
  • Fix logging metrics in DDP mode (#426)
  • Fix make clean-logs command (#430)
  • Fix make sync command (#423)
  • Fix missing CPU trainer (#402)
  • Fix typing (#401)

🧹 Maintenance

  • Upgrade to hydra 1.3 (#480)
  • Rename step() to model_step() for compatibility with recent lightning release (#472)
  • Upgrade deprecated TPU import (#473)
  • Upgrade deprecated accuracy metric initialization to recent torchmetrics release (#475)
  • Refactor task_wrapper decorator (#488)
  • Move tasks code inside entry files (#421)
  • Pre-commit config updates for jupyter notebooks and flake8 (#435)
  • Add separate job for macos in CI test worfklow ( #474)
  • Add separate job for windows in CI test worfklow (#422)
  • Disable ignoring net in mnist module (#481)
  • Remove debug from makefile (#482)
  • Bump pytorch-lightning from 1.7.1 to 1.8.1 (#468)
  • Bump torchmetrics from 0.9.3 to 0.10.0 (#454)
  • Bump pytorch-lightning from 1.6.5 to 1.7.1 (#408)
  • Bump hydra-core from 1.3.0 to 1.3.1 (#492)

📝️ Documentation & Comments

  • Add Vertex AI integration repo to readme (#440)
  • Add explicit comment warning to training_epoch_end() (#486)
  • Improve utils warnings (#483)
  • Fix filenames in docstring (#428)
  • Update example of using tags command in README.md (#465)
  • Improve comments (#429, #441, #476)
  • Fix broken link of datamodule (#444)
  • Update README.md (#419, #425, #442)

@ashleve @yipliu @amorehead @atong01 @YuCao16 @Yongtae723 @cauliyang

v1.4.0

16 Jul 00:01
36bc41f
Compare
Choose a tag to compare

What's Changed

  • Adapt template to hydra 1.2 - no more changing the working directory by default
  • Rename test.py and test.yaml to eval.py and eval.yaml (so as to avoid confusion with project tests)
  • Move train.py and eval.py inside src/
  • Add pyrootutils package for standardizing the project root setup in train.py and eval.py
  • Rename pipelines to tasks
  • Create a separate folder for tasks
  • Add task_name to main config, which determines hydra output folder path
  • Introduce @task_wrapper decorator for applying utilities before and after the task is executed
  • Standardize what is returned from tasks: Tuple[metric_dict, object_dict]
  • Add SimpleDenseNet config to model config with recursive instantiation
  • Add optimizer config to model config using _partial_: true
  • Remove _convert_=partial from trainer instantiation (no longer needed since recent lightning release)
  • Add ckpt_path to main config, trainer.fit() and trainer.test(), for compatibility with recent lightning release
  • Add resetting val_acc_best metric at the start of the training to prevent storing results from validation sanity checks
  • Add verifying logger is not None before logging hparams
  • Add tags to main config
  • Add prompting user to input tags when none are provide to utils.extras()
  • Remove experiment name (since tags and task_name are enough)
  • Rename config to cfg since it's the standard naming convention in hydra
  • Split utils into multiple files: utils.py, rich_utils.py, pylogger.py
  • Add utils.instantiate_callbacks() and utils.instantiate_loggers() to reduce the boilerplate in tasks
  • Add utils.get_metric_value() for safely retrieving optimized metric.
  • Rename utils.finish() to utils.close_loggers()
  • Move extra config utils to configs/extras/default.yaml
  • Replace deprecated trainer.gpus argument with trainer.accelerator and trainer.devices
  • Add separate trainer configs for GPU, CPU, simulating DDP on CPU and MPS accelerator (Accelerated PyTorch Training on Mac)
  • Add hydra.mode=MULTIRUN to mnist_optuna.yaml config (so using -m is no longer needed when attaching this config)
  • Update mnist_opuna.yaml for compatibility with new search space syntax in hydra 1.2
  • Disable callbacks in debug configs by default (fixes debug/overfit.yaml)
  • Disable hydra command line debug logger in debug configs by default
  • Split callbacks config into multiple files
  • Replace setup.cfg with pyproject.toml since it's a more versatile standard (PEP 518)
  • Add pre-commit hooks: pyupgrade (automatically upgrading python syntax to newer version), bandit (security linter), codespell (spelling linter), mdformat (markdown formatting)
  • Redesign testing and add tests covering ddp, multirun, loggers, resuming training and evaluation
  • Implement CI workflows with GitHub Actions: executing pytest, test code coverage measuring, code quality testing for main branch and PRs
  • Add depandabot
  • Add pull request template
  • Add setup.py
  • Add Makefile
  • Update README.md

@nils-werner @johnnynunez @elisim @yu-xiang-wang @yipliu @Gxinhu @binlee52

v1.3.0

19 Feb 21:51
fb7c206
Compare
Choose a tag to compare

The template has been significantly refactored.

List of changes:

  • Introduce multiple pipelines, to showcase example of how one can separate training from evaluation, run.py has been replaced by train.py and test.py
  • The mode group config has been removed since it was confusing, now every run is treated as an experiment, and debugging is moved to a separate config group
  • Introduce debug config group
  • Introduce log_dir config group
  • Move wandb callbacks to the branch wandb-callbacks to make template logger-agnostic
  • Refactor rich config printing, now all config groups are always printed instead of just the pre-selected ones, but you can still decide on the print order
  • Add nbstripout to pre-commit hooks, for automatic clearing of jupyter notebooks outputs before commit
  • Update packages in requirements.txt and pre-commit-config.yaml to newest versions
  • Remove some of the unimportant default optuna parameters in mnist_optuna.yaml and add more explanatory comments
  • Remove no longer needed utilities from utils.extras()
  • Add config flag for skipping training
  • Fix hydra package versions in requirements.txt for mac compatibility
  • Remove redundant parts in filenames: mnist_model.yaml -> mnist.yaml, mnist_datamodule.yaml -> datamodule.yaml
  • Change mnist_model.py -> mnist_module.py and MNISTLitModel -> MNISTLitModule
  • Rename folder modules/ to components/
  • Change accelerator="ddp" to strategy="ddp" since it was depracated by lightning
  • Remove trainer arguments depracated by lightning: weight summary and progress_bar_refresh_rate
  • Specify black profile for isort inside .pre-commit-config.yaml just in case someone deletes the setup.cfg
  • Specify testpath in setup.cfg so pytest knows all test files are placed only in tests/ folder
  • Allow for using relative checkpoint paths
  • Rename folder bash to scripts
  • Introduce vendor dir as a "best practice" for storing third party code
  • Introduce local config files in configs/local/, which can be used for storing machine/user specific configurations, e.g. configuration of slurm cluster
  • Unify logging directories structure
  • Add RichModelSummary to default callbacks
  • Fix missing parameter in "Accessing datamodule attributes" trick in README.md
  • General README.md improvements

Special thanks to: @nils-werner @charlesincharge @Steve-Tod
for their PRs.