stable-baselines3/stable_baselines3/common
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
..
envs Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00
sb2_compat Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00
vec_env 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
__init__.py
atari_wrappers.py Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00
base_class.py Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
buffers.py Automatically create missing directories of `filenames passed to ResultsWriter` (#1072) 2022-09-21 13:14:38 +02:00
callbacks.py Add progress bar callback and argument (#1095) 2022-10-06 18:17:31 +02:00
distributions.py Handling multi-dimensional action spaces (#971) 2022-08-06 14:19:20 +02:00
env_checker.py Raise error when observation keys and observation space keys don't match (#1047) 2022-09-05 14:54:58 +02:00
env_util.py Updated type hint and extended docstring in make_vec_env and make_atari_env (#1085) 2022-10-06 13:36:06 +02:00
evaluation.py Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
logger.py Add progress bar callback and argument (#1095) 2022-10-06 18:17:31 +02:00
monitor.py Automatically create missing directories of `filenames passed to ResultsWriter` (#1072) 2022-09-21 13:14:38 +02:00
noise.py Fix exception cause in base_class.py (#940) 2022-06-21 20:58:02 +01:00
off_policy_algorithm.py Fix type annotation of `policy in BaseAlgorithm and OffPolicyAlgorithm` (#1120) 2022-10-17 10:16:20 +02:00
on_policy_algorithm.py Remove deprecated features and attributes (#1104) 2022-10-11 10:55:16 +02:00
policies.py 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
preprocessing.py Documentation update (#450) 2021-05-23 13:13:11 +02:00
results_plotter.py Fix default arguments + add bugbear (#363) 2021-03-25 11:35:21 +02:00
running_mean_std.py Upgrade code to Python 3.7+ syntax using pyupgrade (#887) 2022-04-25 13:01:38 +03:00
save_util.py 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
torch_layers.py Replace "nature" with "Nature" (magazine) to reduce confusion (#965) 2022-07-15 22:48:27 +02:00
type_aliases.py Update evaluate_policy type annotation to support policies as well as RL algorithms (#1146) 2022-11-03 15:36:19 +01:00
utils.py Clarify and standardize verbosity documentation (#1056) 2022-09-09 16:46:28 +02:00