Is it possible to interpolate a config group? My intention is to interpolate a group’s key from other keys, in this example: selecting a dataset’s config group based on the dataset name and the dataset version (e.g, if the dataset comes from a competition, this might be one of the tasks of the competition). Using hydra’s structured configs, my idea is something like this:
@dataclass
class MainConfig(DictConfig):
dataset_name: str
dataset_version: str
dataset_group: ${.dataset_name}_${.dataset_version}
@dataclass
cass MyDatasetPart1Config(DictConfig):
paths: dict[str, str]
cs = ConfigStore.instance()
cs.store(name="config", node=MainConfig)
cs.store(group="dataset", name="mydataset_part1", node=MyDatasetPart1Config)
def main() ...
if __name__ == "__main__" ...
then be able to call the group like
>>> python myapp.py dataset_name=mydataset version=part1
hoping to be achieve the same as if I used
>>> python myapp.py dataset_group=mydataset_part1