Search code examples
gitfb-hydradvc

Is there any way to log 'git hash' in hydra?


I want to control version of experiment configuration files with hydra and dvc without uploading original config files to git.
Hydra does control config, and dvc controls version. But Hydra does not specify which 'code version' is needed to reproduce experiment. And I don't want to add 'git hash logging code' in every experiments.

Is there any way to log git hash to hydra log in default? thanks in advance


Solution

  • Good timing! A DVC-Hydra integration is in development. You can see the proposal in https://github.com/iterative/dvc/discussions/7044#discussioncomment-3271855 and the development progress in https://github.com/iterative/dvc/pull/8093. This should allow you to take a Hydra config, pass your Hydra overrides via dvc exp run --set-param=<hydra_overrides>, and capture the output with DVC.