clay-lab / transductions

A PyTorch framework for creating, running, and reproducing experiments on seq2seq models.
6 stars 3 forks source link

Restructure YAML configs #41

Closed jopetty closed 3 years ago

jopetty commented 3 years ago

I think it makes sense to structure the configs like this:

config/
  train.yaml
  eval.yaml
  experiments/
    experiment-1.yaml
    ...
    model/
      ...
    dataset/
      ...
    hyperparameters/
      ...

experiments should really be the top-level config group since they reference datasets, models, and hyperparameters. Experiments which share datasets can point to shared config files in the dataset directory.

jopetty commented 3 years ago

In order for this to work ideally, we'll need a version of Hydra with support for recursive defaults to drop. It seems like this is targeted for the 1.1 release "soon".

jopetty commented 3 years ago

Moving from conda to poetry allows use to target the 1.1.0.dev2 release of hydra-core, with support for recursive defaults. Now the directory structure is as follows:

conf/
  train.yaml
  eval.yaml
  repl.yaml
  experiment/
    experiment-1.yaml
    ....
  model/
  dataset/
  hyperparameters/

The default train.yaml file contains a missing default option for experiment: ???, and an experiment-n.yaml file should have the following form:

defaults:
  - dataset: ???
  - model: ???
  - hyperparameters: ???

name: ???