diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f4798b..0b89d41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: stablebaselines/stable-baselines3-cpu:0.6.0a7 +image: stablebaselines/stable-baselines3-cpu:0.6.0 type-check: script: @@ -15,5 +15,4 @@ doc-build: lint-check: script: - - pip install flake8 # TODO: remove when new version on Pypi - make lint diff --git a/Dockerfile b/Dockerfile index be8eb57..0b30e6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN \ cd ${CODE_DIR}/stable-baselines3 3&& \ pip install -e .[extra,tests,docs] && \ # Use headless version for docker + pip uninstall -y opencv-python && \ pip install opencv-python-headless && \ rm -rf $HOME/.cache/pip diff --git a/README.md b/README.md index 402d556..b6716c9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ **WARNING: Stable Baselines3 is currently in a beta version, breaking changes may occur before 1.0 is released** -Note: most of the documentation of [Stable Baselines](https://github.com/hill-a/stable-baselines) should be still valid though. # Stable Baselines3 @@ -35,7 +34,6 @@ These algorithms will make it easier for the research community and industry to | High code coverage | :heavy_check_mark: | | Type hints | :heavy_check_mark: | - ### Roadmap to V1.0 @@ -45,7 +43,6 @@ Planned features: - [ ] DQN (almost ready, currently in testing phase) - [ ] DDPG (you can use its successor TD3 for now) - [ ] HER -- [ ] Support for MultiDiscrete and MultiBinary action spaces ### Planned features (v1.1+) diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 8df8ef8..d01cdaa 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -3,9 +3,11 @@ Changelog ========== -Pre-Release 0.6.0a11 (WIP) +Pre-Release 0.6.0 (2020-06-01) ------------------------------ +**Tensorboard support, refactored logger** + Breaking Changes: ^^^^^^^^^^^^^^^^^ - Remove State-Dependent Exploration (SDE) support for ``TD3`` @@ -47,6 +49,7 @@ Others: - Added ``.readthedoc.yml`` file - Added ``flake8`` and ``make lint`` command - Added Github workflow +- Added warning when passing both ``train_freq`` and ``n_episodes_rollout`` to Off-Policy Algorithms Documentation: ^^^^^^^^^^^^^^ diff --git a/stable_baselines3/common/base_class.py b/stable_baselines3/common/base_class.py index e24bd2c..e64243c 100644 --- a/stable_baselines3/common/base_class.py +++ b/stable_baselines3/common/base_class.py @@ -3,6 +3,7 @@ import os import io import zipfile import pickle +import warnings from typing import Union, Type, Optional, Dict, Any, List, Tuple, Callable from abc import ABC, abstractmethod from collections import deque @@ -800,6 +801,17 @@ class OffPolicyRLModel(BaseRLModel): assert isinstance(env, VecEnv), "You must pass a VecEnv" assert env.num_envs == 1, "OffPolicyRLModel only support single environment" + if n_episodes > 0 and n_steps > 0: + # Note we are refering to the constructor arguments + # that are named `train_freq` and `n_episodes_rollout` + # but correspond to `n_steps` and `n_episodes` here + warnings.warn("You passed a positive value for `train_freq` and `n_episodes_rollout`." + "Please make sure this is intended. " + "The agent will collect data by stepping in the environment " + "until both conditions are true: " + "`number of steps in the env` >= `train_freq` and " + "`number of episodes` > `n_episodes_rollout`") + if self.use_sde: self.actor.reset_noise() diff --git a/stable_baselines3/version.txt b/stable_baselines3/version.txt index 62dbca2..a918a2a 100644 --- a/stable_baselines3/version.txt +++ b/stable_baselines3/version.txt @@ -1 +1 @@ -0.6.0a11 +0.6.0