facebookresearch / EGG

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

TensorboardLogger writer is none #183

Closed nicofirst1 closed 3 years ago

nicofirst1 commented 3 years ago

Expected Behavior

If the user didn't install the tensorbard lib correctly, then the get summary should raise an error.

Current Behavior

Right now the function prints an warning, but if you use the TensorboardLogger, at the end of the training epoch this method will trow an error since self.writer is None. For long epochs this is a waste of time

Possible Implementation

Either change this with a raise error or add an assertion of the kind

assert self.writer is not None

in the TensorboardLogger init

robertodessi commented 3 years ago

Thanks for spotting this! Feel free to open a PR if you like, otherwise I'll fix it sometime next week