hydra-torch icon indicating copy to clipboard operation
hydra-torch copied to clipboard

[hydra-configs-torch][tests] Optimizers and LR schedulers

Open romesco opened this issue 4 years ago • 1 comments

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:

  1. Ensure the config exists.
  2. Be a valid input to instantiate (and subsequently get an object back).
  3. 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.

romesco avatar Sep 26 '20 01:09 romesco

Need to complete LR schedulers as well.

romesco avatar Oct 15 '20 17:10 romesco