Skip to content

v1.4.0

Compare
Choose a tag to compare
@ashleve ashleve released this 16 Jul 00:01
· 80 commits to main since this release
36bc41f

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