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

Duplicate keys in YAML are overwritten with the last key #17

Open
bernhardschaefer opened this issue Mar 8, 2019 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@bernhardschaefer
Copy link

yacs uses safe_load() from pyyaml.

There is a downstream bug with duplicate keys, in the current implementation pyyaml only considers the last key occurrence and does not produce any warning/error: yaml/pyyaml#165
The linked issue contains discussions about workarounds.

This leads to very subtle errors, see e.g.
facebookresearch/maskrcnn-benchmark#545

@rbgirshick rbgirshick added the enhancement New feature or request label Mar 9, 2019
@rbgirshick
Copy link
Owner

rbgirshick commented Mar 9, 2019

Thanks for flagging this issue. I agree that yacs should check for duplicate keys and raise an exception if any are found.

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

No branches or pull requests

2 participants