Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Load YAML with BASE config #32

Open
qizhuli opened this issue Oct 12, 2019 · 1 comment
Open

[Feature request] Load YAML with BASE config #32

qizhuli opened this issue Oct 12, 2019 · 1 comment

Comments

@qizhuli
Copy link

qizhuli commented Oct 12, 2019

Allow constructing a new config file based on an existing one

This feature has been implemented in the config class in repo facebookresearch/fvcore, which uses a special key _BASE_ to specify a base config file.

Such a feature improves the maintainability of large number of similar config files, and helps highlight the difference between similar configs.

Would like to hear your opinion on this. Many thanks.

@vakker
Copy link

vakker commented Feb 25, 2022

That would make YACS really great, another example is the MMCV config parser. I would assume that it's relatively simple to implement, e.g. something like:

cfg = get_cfg_defaults()
cfg.merge_from_file("experiment.yaml")

for base_file in cfg._BASE_:
    cfg.merge_from_file(base_file)

Maybe the order or merging should be the other way around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants