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] Support .yml in addition to .yaml for config composition #398

Closed
tamuhey opened this issue Feb 4, 2020 · 4 comments
Closed
Labels
enhancement Enhanvement request wishlist Low priority feature requests

Comments

@tamuhey
Copy link

tamuhey commented Feb 4, 2020

πŸš€ Feature Request

Motivation

Is your feature request related to a problem? Please describe.

The directory structure of my app looks like:

β”œβ”€β”€ db
β”‚   β”œβ”€β”€ mysql.yml
β”‚   └── postgresql.yml
β”œβ”€β”€ config.yml
└── my_app.py

and the config.yml is:

defaults:
    - db: mysql

Running app.py raises the error:

hydra.errors.MissingConfigException: Could not load db/mysql.yaml

Hydra seems to support .yaml but not .yml.

@tamuhey tamuhey added the enhancement Enhanvement request label Feb 4, 2020
@omry
Copy link
Collaborator

omry commented Feb 4, 2020

Hi @tamuhey, is there a specific case for this? I am not sure supporting .yml files justifies checking for the existence of a file with the second extension if the first one fails.
it also opens up to weird cases where you have both yaml and yml files.

@tamuhey
Copy link
Author

tamuhey commented Feb 4, 2020

It's a matter of preference.
Because .yml is widely used (e.g. github actions auto generated file), users sometimes have .yml and .yaml in same repository if they use hydra.

@omry
Copy link
Collaborator

omry commented Feb 4, 2020

I am going to park this one.
I will reconsider if it gets a significant number of votes, for now there does not seem to be a solid enough case here.

The magical support for .yaml is making things more complicated they I would like them to be. I don't want to make things even worse by adding support for .yml files.

@omry omry added the wishlist Low priority feature requests label Feb 12, 2020
@omry
Copy link
Collaborator

omry commented May 13, 2020

This does not seem to justify the extra complexity, closing.

@omry omry closed this as completed May 13, 2020
yota-p added a commit to yota-p/hydra that referenced this issue Jan 16, 2021
The document needs to explicitly note that file extension should be `yaml`, and `.yml` can't be used. 
I ran in a error when trying to use `.yml`, and took some time to solve. 

Related issues: facebookresearch#398 facebookresearch#1050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhanvement request wishlist Low priority feature requests
Projects
None yet
Development

No branches or pull requests

2 participants