Hydra: [Feature Request] Support .yml in addition to .yaml for config composition

Created on 4 Feb 2020  ยท  4Comments  ยท  Source: facebookresearch/hydra

๐Ÿš€ 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.

enhancement wishlist

Most helpful comment

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.

All 4 comments

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.

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings