facebookresearch / EGG

EGG: Emergence of lanGuage in Games
MIT License
281 stars 99 forks source link

Hypertune decorator #193

Closed nicofirst1 closed 3 years ago

nicofirst1 commented 3 years ago

Implemented decorator which can be used on any main function to run a combination of experiment sequentially. The decorator needs a json parameter file (invoked with --sweep_file) from which to take the parameters. The file may contain a dictionary of lists of values, in which case the combination will be the Cartesian product between the lists. The file may also contain a list of dictionaries, in which case each dictionary is treated as above defining separated Cartesian products.

robertodessi commented 3 years ago

Thanks, it looks nice! The main difference with https://github.com/facebookresearch/EGG/blob/master/egg/nest/nest_local.py is the decorator part? How about an integration instead? Plus I think some multiprocessing would nice to handle the search

robertodessi commented 3 years ago

Some CI tests are failing, did you have the chance to try them locally first?

UPDATE: fix CI tests

nicofirst1 commented 3 years ago

The main difference with https://github.com/facebookresearch/EGG/blob/master/egg/nest/nest_local.py is the decorator part? How about an integration instead? Plus I think some multiprocessing would nice to handle the search

Actually this is intended to work on a single process for low resources machines. The differences are that in nest_local the number of workers are used to run combination in parallel while in the hypertune implementation the workers are passed to the dataloader of a single combination at the time. Plus hypertune allows for multiple list of combinations