Summary:
In the base LightningModule class we define an optional logger property which may be
initialized to None, while in DQNtrainer._log_dqn method we try to access the logger
object without checking first if it was initialized. The issue surfaced when trying to run
unit tests analogous to those in test_qrdqn. This commit adds a check whether
the logger is initialized prior to attempting to use it.
Interestingly, the analogous QRDQNTrainer class implementation does not use the
logger property for logging, perhaps it's redundant?
Summary: In the base LightningModule class we define an optional
logger
property which may be initialized to None, while in DQNtrainer._log_dqn method we try to access thelogger
object without checking first if it was initialized. The issue surfaced when trying to run unit tests analogous to those intest_qrdqn
. This commit adds a check whether thelogger
is initialized prior to attempting to use it. Interestingly, the analogous QRDQNTrainer class implementation does not use thelogger
property for logging, perhaps it's redundant?Differential Revision: D37529027