facebookresearch / EGG

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

save sender/receiver instead of game in checkpoint #171

Closed robertodessi closed 3 years ago

robertodessi commented 3 years ago

Description

Decoupling sender/receiver from Game when loading/storing a checkpoint. Useful for post-training analysis. This way when we load the model we don't have to do things like define a new game, passing a (dummy?) loss. We would have straight access to sender/receiver compared to accessing them through game.sender or game.receiver. Note that the latter is not compatible with the experimental implementation of PopulationGame as that class has only two fields: a sampler and a game field. So loading a game and accessing game.sender or game.receiver causes a crash. The user knows before hand what kind of game s/he's loading so not sure this is really a problem. On the other hand, I have not yet thought how to handle cases like the PopulationGame when storing a model. Should we store all agents in the populations individually? Not really feasible or smart.

Related Issue (if any)

148, #150

Motivation and Context

Useful for language analysis or for manually feeding sender/receiver input/messages