v1.4.0
What's Changed
- Adapt template to
hydra 1.2
- no more changing the working directory by default - Rename
test.py
andtest.yaml
toeval.py
andeval.yaml
(so as to avoid confusion with project tests) - Move
train.py
andeval.py
insidesrc/
- Add
pyrootutils
package for standardizing the project root setup intrain.py
andeval.py
- Rename
pipelines
totasks
- 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()
andtrainer.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 andtask_name
are enough) - Rename
config
tocfg
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()
andutils.instantiate_loggers()
to reduce the boilerplate in tasks - Add
utils.get_metric_value()
for safely retrieving optimized metric. - Rename
utils.finish()
toutils.close_loggers()
- Move extra config utils to
configs/extras/default.yaml
- Replace deprecated
trainer.gpus
argument withtrainer.accelerator
andtrainer.devices
- Add separate trainer configs for GPU, CPU, simulating DDP on CPU and MPS accelerator (Accelerated PyTorch Training on Mac)
- Add
hydra.mode=MULTIRUN
tomnist_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 inhydra 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
withpyproject.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