0

is it possible to have a 2-degree sibling file as a default configuration?

Files hierarchy:

dir_1
├── dir_1_1
│   └── dir_1_1_1
│       └── conf.yaml
└── dir_1_2
    └── dir_1_2_1
        └── dataset_paths_1.yaml

I want to have dataset_path configurations as a default configurations in conf.yaml.

What I tried:

conf.yaml:

defaults:
  - /../../dir_1_2/dir_1_2_1@dataset_paths: dataset_paths_1
  - _self_
Ilan Geffen
  • 179
  • 8

1 Answers1

0

You can access configs which are not in your subtree in an absolute addressing. Note that I am assuming that dir_1 is a root in your config search path.

defaults:
  - /dir_1_2/dir_1_2_1@dataset_paths: dataset_paths_1
  - _self_

See The Defaults List.

Omry Yadan
  • 31,280
  • 18
  • 64
  • 87