stable-baselines3/stable_baselines3/dqn
Adam Gleave 4fb8aec215
Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146)
* Add PolicyPredictor protocol and use it in evaluate_policy

* Update changelog

* Move Protocol to type_aliases to avoid circular import

* Add test for evaluate_policy on BasePolicy

* Remove unused import

* Use typing_extensions

* Move typing_extensions to 3rd party

* Add version range (typing_extensions uses SemVer)

* Import Protocol from typing_extensions only on Python<3.8

Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>

* Install typing_extensions only on Python<3.8

* Add missing sys import

* Fix import ordering

* Fix observation type hint in predict

Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
Co-authored-by: Quentin GALLOUÉDEC <gallouedec.quentin@gmail.com>
2022-11-03 15:36:19 +01:00
..
__init__.py Dictionary Observations (#243) 2021-05-11 12:29:30 +02:00
dqn.py Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
policies.py Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00