hydra-torch
hydra-torch copied to clipboard
[hydra-configs-torch][tests] Optimizers and LR schedulers
https://github.com/facebookresearch/hydra-torch/blob/691a390abd2edf764f9431a56b8058ff2c12eb0c/tests/test_instantiate.py#L40
Check minimal tests. Is this the right way to confirm our configs instantiate the correct object?
From previous PR discussion:
Ideally I wanted these tests to do 3 things:
- Ensure the config exists.
- Be a valid input to instantiate (and subsequently get an object back).
- Show that this object works as expected.
For an optimizer, taking a step seems to prove that it is functioning correctly. Comparing the output of your cfg optimizer and a directly called optimizer is kind of a bonus in that if it didn't work, it doesn't mean we didn't instantiate an optimizer correctly given the config. It just means the optimizer has nondeterministic behavior.
Need to complete LR schedulers as well.