diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 70716d5..7204bf6 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -3,7 +3,7 @@ Changelog ========== -Release 2.2.0a2 (WIP) +Release 2.2.0a3 (WIP) -------------------------- Breaking Changes: @@ -32,6 +32,7 @@ Bug Fixes: - Calls ``callback.update_locals()`` before ``callback.on_rollout_end()`` in OnPolicyAlgorithm (@PatrickHelm) - Fixed replay buffer device after loading in OffPolicyAlgorithm (@PatrickHelm) - Fixed ``render_mode`` which was not properly loaded when using ``VecNormalize.load()`` +- Fixed success reward dtype in ``SimpleMultiObsEnv`` (@NixGD) Deprecations: diff --git a/stable_baselines3/common/envs/multi_input_envs.py b/stable_baselines3/common/envs/multi_input_envs.py index d7e222d..f34d13b 100644 --- a/stable_baselines3/common/envs/multi_input_envs.py +++ b/stable_baselines3/common/envs/multi_input_envs.py @@ -150,7 +150,7 @@ class SimpleMultiObsEnv(gym.Env): self.state -= self.num_col got_to_end = self.state == self.max_state - reward = 1 if got_to_end else reward + reward = 1.0 if got_to_end else reward truncated = self.count > self.max_count terminated = got_to_end diff --git a/stable_baselines3/common/logger.py b/stable_baselines3/common/logger.py index 3955131..363a9d2 100644 --- a/stable_baselines3/common/logger.py +++ b/stable_baselines3/common/logger.py @@ -8,10 +8,10 @@ from collections import defaultdict from io import TextIOBase from typing import Any, Dict, List, Mapping, Optional, Sequence, TextIO, Tuple, Union +import matplotlib.figure import numpy as np import pandas import torch as th -from matplotlib import pyplot as plt try: from torch.utils.tensorboard import SummaryWriter @@ -52,7 +52,7 @@ class Figure: :param close: if true, close the figure after logging it """ - def __init__(self, figure: plt.figure, close: bool): + def __init__(self, figure: matplotlib.figure.Figure, close: bool): self.figure = figure self.close = close diff --git a/stable_baselines3/version.txt b/stable_baselines3/version.txt index 59ead85..aaceff2 100644 --- a/stable_baselines3/version.txt +++ b/stable_baselines3/version.txt @@ -1 +1 @@ -2.2.0a2 +2.2.0a3