Skip to content

Commit

Permalink
Pre-Release v0.6.0 (#39)
Browse files Browse the repository at this point in the history
* Prepare release

* Update docker images
  • Loading branch information
araffin committed Jun 1, 2020
1 parent bb01253 commit 403fff5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: stablebaselines/stable-baselines3-cpu:0.6.0a7
image: stablebaselines/stable-baselines3-cpu:0.6.0

type-check:
script:
Expand All @@ -15,5 +15,4 @@ doc-build:

lint-check:
script:
- pip install flake8 # TODO: remove when new version on Pypi
- make lint
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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: |

<!-- | Tensorboard support | :heavy_check_mark: | -->

### Roadmap to V1.0

Expand All @@ -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+)

Expand Down
5 changes: 4 additions & 1 deletion docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down Expand Up @@ -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:
^^^^^^^^^^^^^^
Expand Down
12 changes: 12 additions & 0 deletions stable_baselines3/common/base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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
Expand Down Expand Up @@ -800,6 +801,17 @@ def collect_rollouts(self, # noqa: C901
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()

Expand Down
2 changes: 1 addition & 1 deletion stable_baselines3/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0a11
0.6.0

0 comments on commit 403fff5

Please sign in to comment.