rte-france / l2rpn-baselines

L2RPN Baselines a repository to host baselines for l2rpn competitions.
https://l2rpn-baselines.readthedocs.io/en/stable/
Mozilla Public License 2.0
81 stars 45 forks source link

Wrong name for the "_optimizer_model" attribute #13

Closed BDonnot closed 4 years ago

BDonnot commented 4 years ago

In the code of the BaseDeepQ class the attribute optimizer_model is private, whereas it is incorrectly used in the class DeepQAgent (accessed through optimizer_model)

To fix this issue, just update this line https://github.com/rte-france/l2rpn-baselines/blob/master/l2rpn_baselines/utils/DeepQAgent.py#L591 with:

self._train_lr = self.deep_q._optimizer_model._decayed_lr('float32').numpy()

Also this entails that the tests do not attempt to train the baselines at all. This would be nice to fix them.