我正在使用Hydra来配置我的 Python 应用程序。我真的很喜欢如何拥有默认配置并为某些配置属性创建“覆盖”。但是,我不知道如何从运行中删除属性(例如删除属性)。我看到通过终端可以做到这一点python run.py ~foo.bar
,但我想知道如何用配置文件做同样的事情?
例如,在以下配置文件中,我将覆盖 max_epochs,但如何将属性 max_epochs 全部删除?
defaults:
- override /trainer: minimal.yaml # choose trainer from 'configs/trainer/'
# all parameters below will be merged
# with parameters from default configurations set above
# this allows you to overwrite only specified parameters
trainer:
min_epochs: 1
max_epochs: 100
check_val_every_n_epoch: 20
gpus: 1