I am currently experimenting with hydra-conf for my deep learning project. For training, i follow the way shown in the documentation:
- folder of configuration files, a main config.yml file with additional configurations groups in extra folders
- my main method is decorated with @hydra.main(...) to initialize/load the configuration
When my model is trained, i save the corresponding state dict.
Now the question is, what is the intended way of doing model inference using hydra? My idea is to use the model checkpoint as well as the run-specific config.yml file in the .hydra folder to get the constructor-parameters i need for instantiating the model, before loading the state dict.
Is there a better way to achieve my goal?
Edit 1: When trying to use the @hydra.main() approach i do not know how i would pass a dynamic config-file path to the decorator, since this would be supplied by the user (Scenario: I want to do inference on a certain model by providing the path to the config file in the training-run folder created by hydra)