stable-baselines3/stable_baselines3
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
..
a2c Remove deprecated features and attributes (#1104) 2022-10-11 10:55:16 +02:00
common Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
ddpg Remove deprecated features and attributes (#1104) 2022-10-11 10:55:16 +02:00
dqn Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
her Add append mode to Monitor (#1037) 2022-08-31 11:53:44 +02:00
ppo Remove deprecated features and attributes (#1104) 2022-10-11 10:55:16 +02:00
sac Allow model trained with python3.7 to be loaded with python3.8+ without the custom_objects workaround (#1123) 2022-10-17 17:33:47 +02:00
td3 Remove deprecated features and attributes (#1104) 2022-10-11 10:55:16 +02:00
__init__.py Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00
py.typed Rename to stable-baselines3 2020-05-05 15:02:35 +02:00
version.txt Allow model trained with python3.7 to be loaded with python3.8+ without the custom_objects workaround (#1123) 2022-10-17 17:33:47 +02:00