0

I'd like to be able to write a yaml file something like:

runner:
    _target_: my_module.Runner
    lightning_module:
        _target_: my_module.MyLightingModule
        precision: 16
    data_module:
        _target_: my_module.MyDataModule
        training_data: s3://foo/bar.csv
        validation_data: s3://foo/bar_val.csv
        test_data: s3://foo/bar_tst.csv

and then in my program run this whole thing by doing simply:

runner = hydra.utils.instantiate(cfg)
runner.run()

I see there is a PR to enable recursive instantiation, ie https://github.com/facebookresearch/hydra/pull/989 Please can you confirm that this will enable the code/config above?

Also, what is intended release date for this merged PR?

(I feel kind of a little bit non-standard putting questions which are basically feature requests into stackoverflow, so if you have a better suggestion on where to put these, please let me know)

Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71

1 Answers1

1

Go ahead and check-out Hydra from master and play with the recursive instantiation support to confirm for yourself.

The docs for instantiate in the next version are here.

There is no set date for 1.1. but it will be a while. At some point there will be some dev releases though. For now you can install from master.

Omry Yadan
  • 31,280
  • 18
  • 64
  • 87
  • installing from master doesn't fit well into pipeline. I think it mostly precludes it from use. by 'a while', do you mean more like weeks or months? – Hugh Perkins Oct 31 '20 at 17:11
  • Months. I recommend that you experiment with it to that that once it's released it will address your use case. – Omry Yadan Oct 31 '20 at 21:50