Skip to content

Conversation

@vict0rsch
Copy link
Collaborator

@vict0rsch vict0rsch commented Oct 12, 2022

New configs:

  1. Provide a config argument string as {model}-{task}-{split}. Example: --config=sfarinet-is2re-all
  2. The main (almost only) code change is in utils.py with the new load_config(config_str) function which processes the files this way:
    1. Load configs/tasks/{task}.yaml
      1. Read its default dict as initial config
      2. Update config with the task's {split} dict
    2. Load configs/{model}.yaml
      1. Update config from the model's default dict
      2. Update config from the model's {task}.default dict if it exists
      3. Update config from the model's {task}.{split} dict
    3. Tada 🎉
  3. Mode is train by default (in {task}.yaml)
  4. All previous configs are moved to a configs/legacy/ folder

@AlexDuvalinho
Copy link
Collaborator

AlexDuvalinho commented Oct 13, 2022

Before merging, do you think we shall also change ase_utils.py, OCPCalculator ? It leverages (the "old") config_yml, which may cause troubles if the function is called, wouldn't it ?
It's not directly use for this purpose but in case we need it later, it may be good to adapt it now while it's fresh in our minds

Otherwise, it's great !

@vict0rsch
Copy link
Collaborator Author

Done :)

@vict0rsch vict0rsch merged commit d7d5e8d into better-config Oct 13, 2022
@vict0rsch vict0rsch deleted the model-config branch October 13, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants