Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hydra entrypoint #867

Merged
merged 16 commits into from
Oct 18, 2024
Merged

Add hydra entrypoint #867

merged 16 commits into from
Oct 18, 2024

Conversation

rayg1234
Copy link
Collaborator

@rayg1234 rayg1234 commented Sep 20, 2024

This adds a separate entrypoint to use hydra configs and eventually replace the current fairchem configs. More info here.

Additions

  • A new cli that is similiar to the old cli but shares the same flags and can be activated for now using the --hydra option.
  • A new abstract runner that allows any runner to be runner (previously, it fixed to the old trainer class which forces us to put all things train, eval, relaxations etc under the trainer). Having separate "runners" will allow us to separately implement trainers, evaluators etc.
  • slight modernization to how the cuda devices are initialized to support the new cli/runner
  • a test runner that can be initialized using hydra
  • Slight modification of the relaxation code so that its less tied to the ocp trainer
  • Separate PR that shows an implementation of the relaxation runner using this new cli/runner combo.

To run local:
fairchem --config-yml=src/fairchem/experimental/foundation_models/evaluation/matbench_discovery/matbench_example.ymll --hydra

To run on slurm:
fairchem --config-yml=src/fairchem/experimental/foundation_models/evaluation/matbench_discovery/matbench_example.ymll --hydra --submit --num-gpus=8

TODO in separate PR:

  • add WB logger, probably need singleton logger to avoid abusing the main config

@rayg1234 rayg1234 added enhancement New feature or request minor Minor version release labels Sep 20, 2024
@rayg1234 rayg1234 marked this pull request as ready for review October 7, 2024 22:49
Copy link

codecov bot commented Oct 8, 2024

misko
misko previously approved these changes Oct 11, 2024
Copy link
Collaborator

@misko misko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rayg1234 rayg1234 added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 8a9adbb Oct 18, 2024
8 checks passed
@rayg1234 rayg1234 deleted the rgao_add_hydra_entrypoint branch October 18, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Minor version release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants