stable-baselines3 breaking changes
stable-baselines3 2.0.0 (June 23, 2023) is its newest release with breaking changes, 127 of them. The first: Removed HerReplayBuffer.online_sampling. Every breaking API change we have recorded in stable-baselines3 on PyPI: 200 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 2.9.2, released October 26, 2026.
Its 2.0.0 release drops Python 3.7. Python end of life dates.
- From 1.0 to 2.0.0: 127 breaking changes in 1 version.
- From 0.11.0 to 2.0.0: 136 breaking changes in 2 versions.
stable-baselines3 2.0.0 breaking changes
- Removed
HerReplayBuffer.online_sampling
The deprecated online_sampling argument of HerReplayBuffer was removed; code passing it must drop it. github.com - Removed
stable_baselines3.common.atari_wrappers.GymObs
stable_baselines3.common.atari_wrappers.GymObs was removed in stable-baselines3 2.0.0 pypi.org - Removed
stable_baselines3.common.atari_wrappers.GymStepReturn
stable_baselines3.common.atari_wrappers.GymStepReturn was removed in stable-baselines3 2.0.0 pypi.org - Removed
stable_baselines3.common.vec_env.stacked_observations.StackedObservations.stack_observation_space
StackedObservations.stack_observation_space was removed in stable-baselines3 2.0.0 pypi.org - Removed
stable_baselines3.common.vec_env.StackedObservations.stack_observation_space
StackedObservations.stack_observation_space was removed in stable-baselines3 2.0.0 pypi.org - Removed
StackedObservations.stack_observation_space
The deprecated stack_observation_space method of StackedObservations was removed. github.com - Behavior changed
Gymnasium is now the primary backend; Gym 0.21 and 0.26 remain supported only via the shimmy package. github.com - Behavior changed
evaluate_policy
Environment output observations were renamed in evaluate_policy so they no longer shadow input observations during callbacks; update code that reads those names. github.com - Behavior changed
HumanOutputFormat
The file argument check now requires an instance of io.TextIOBase instead of any object with a write method. github.com - Behavior changed
seed
The seed() method now returns a Sequence rather than a List. github.com - Behavior changed
vec_env.seed
Due to the Gym 0.26+ API, the seed passed to vec_env.seed only becomes effective after env.reset() is called. github.com - Configuration changed
Version 2.0 is the last to support Python 3.7; users should upgrade to Python 3.8 or later. github.com - Signature changed
stable_baselines3.a2c.a2c.OnPolicyAlgorithm.__init__
Was def __init__(self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str], learning_rate: Union[float, Schedule], n_steps: int, gamma: float, gae_lambda: float, ent_coef: float, vf_coef: float, max_grad_norm: float... pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.AtariWrapper
Was class AtariWrapper(gym.Wrapper); now class AtariWrapper(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.ClipRewardEnv.reward
Was def reward(self, reward: float) -> float; now def reward(self, reward: SupportsFloat) -> float. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.EpisodicLifeEnv
Was class EpisodicLifeEnv(gym.Wrapper); now class EpisodicLifeEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.EpisodicLifeEnv.reset
Was def reset(self, **kwargs) -> np.ndarray; now def reset(self, **kwargs) -> AtariResetReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.EpisodicLifeEnv.step
Was def step(self, action: int) -> GymStepReturn; now def step(self, action: int) -> AtariStepReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.FireResetEnv
Was class FireResetEnv(gym.Wrapper); now class FireResetEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.FireResetEnv.reset
Was def reset(self, **kwargs) -> np.ndarray; now def reset(self, **kwargs) -> AtariResetReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.MaxAndSkipEnv
Was class MaxAndSkipEnv(gym.Wrapper); now class MaxAndSkipEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.MaxAndSkipEnv.step
Was def step(self, action: int) -> GymStepReturn; now def step(self, action: int) -> AtariStepReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.NoopResetEnv
Was class NoopResetEnv(gym.Wrapper); now class NoopResetEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.NoopResetEnv.reset
Was def reset(self, **kwargs) -> np.ndarray; now def reset(self, **kwargs) -> AtariResetReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.StickyActionEnv
Was class StickyActionEnv(gym.Wrapper); now class StickyActionEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.StickyActionEnv.reset
Was def reset(self, **kwargs) -> GymObs; now def reset(self, **kwargs) -> AtariResetReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.StickyActionEnv.step
Was def step(self, action: int) -> GymStepReturn; now def step(self, action: int) -> AtariStepReturn. pypi.org - Signature changed
stable_baselines3.common.atari_wrappers.WarpFrame
Was class WarpFrame(gym.ObservationWrapper); now class WarpFrame(gym.ObservationWrapper[np.ndarray, int, np.ndarray]). pypi.org - Signature changed
stable_baselines3.common.base_class.BaseAlgorithm.__init__
Was def __init__(self, policy: Union[str, Type[BasePolicy]], env: Union[GymEnv, str, None], learning_rate: Union[float, Schedule], policy_kwargs: Optional[Dict[str, Any]] = None, stats_window_size: int = 100, tensorboard_log: Optional[str]... pypi.org - Signature changed
stable_baselines3.common.base_class.BaseAlgorithm.set_parameters
Was def set_parameters(self, load_path_or_dict: Union[str, Dict[str, Dict]], exact_match: bool = True, device: Union[th.device, str] = 'auto') -> None; now def set_parameters(self, load_path_or_dict: Union[str, TensorDict], exact_match... pypi.org - Signature changed
stable_baselines3.common.base_class.ConvertCallback.__init__
Was def __init__(self, callback: Callable[[Dict[str, Any], Dict[str, Any]], bool], verbose: int = 0); now def __init__(self, callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], bool]], verbose: int = 0). pypi.org - Signature changed
stable_baselines3.common.base_class.DummyVecEnv.get_images
Was def get_images(self) -> Sequence[np.ndarray]; now def get_images(self) -> Sequence[Optional[np.ndarray]]. pypi.org - Signature changed
stable_baselines3.common.base_class.DummyVecEnv.render
Was def render(self, mode: str = 'human') -> Optional[np.ndarray]; now def render(self, mode: Optional[str] = None) -> Optional[np.ndarray]. pypi.org - Signature changed
stable_baselines3.common.base_class.DummyVecEnv.seed
Was def seed(self, seed: Optional[int] = None) -> List[Union[None, int]]; now def seed(self, seed: Optional[int] = None) -> Sequence[Union[None, int]]. pypi.org - Signature changed
stable_baselines3.common.base_class.is_wrapped
Was def is_wrapped(env: Type[gym.Env], wrapper_class: Type[gym.Wrapper]) -> bool; now def is_wrapped(env: gym.Env, wrapper_class: Type[gym.Wrapper]) -> bool. pypi.org - Signature changed
stable_baselines3.common.base_class.load_from_zip_file
Was def load_from_zip_file(load_path: Union[str, pathlib.Path, io.BufferedIOBase], load_data: bool = True, custom_objects: Optional[Dict[str, Any]] = None, device: Union[th.device, str] = 'auto', verbose: int = 0, print_system_info: bool =... pypi.org - Signature changed
stable_baselines3.common.base_class.Logger.get_dir
Was def get_dir(self) -> str; now def get_dir(self) -> Optional[str]. pypi.org - Signature changed
stable_baselines3.common.base_class.Logger.record_mean
Was def record_mean(self, key: str, value: Any, exclude: Optional[Union[str, Tuple[str, ...]]] = None) -> None; now def record_mean(self, key: str, value: Optional[float], exclude: Optional[Union[str, Tuple[str, ...]]] = None) -> None. pypi.org - Signature changed
stable_baselines3.common.base_class.maybe_make_env
Was def maybe_make_env(env: Union[GymEnv, str, None], verbose: int) -> Optional[GymEnv]; now def maybe_make_env(env: Union[GymEnv, str], verbose: int) -> GymEnv. pypi.org - Signature changed
stable_baselines3.common.base_class.Monitor
Was class Monitor(gym.Wrapper); now class Monitor(gym.Wrapper[ObsType, ActType, ObsType, ActType]). pypi.org - Signature changed
stable_baselines3.common.base_class.Monitor.reset
Was def reset(self, **kwargs) -> GymObs; now def reset(self, **kwargs) -> Tuple[ObsType, Dict[str, Any]]. pypi.org - Signature changed
stable_baselines3.common.base_class.Monitor.step
Was def step(self, action: Union[np.ndarray, int]) -> GymStepReturn; now def step(self, action: ActType) -> Tuple[ObsType, SupportsFloat, bool, bool, Dict[str, Any]]. pypi.org - Signature changed
stable_baselines3.common.base_class.VecEnv.get_images
Was def get_images(self) -> Sequence[np.ndarray]; now def get_images(self) -> Sequence[Optional[np.ndarray]]. pypi.org - Signature changed
stable_baselines3.common.base_class.VecEnv.render
Was def render(self, mode: str = 'human') -> Optional[np.ndarray]; now def render(self, mode: Optional[str] = None) -> Optional[np.ndarray]. pypi.org - Signature changed
stable_baselines3.common.base_class.VecEnv.seed
Was def seed(self, seed: Optional[int] = None) -> List[Union[None, int]]; now def seed(self, seed: Optional[int] = None) -> Sequence[Union[None, int]]. pypi.org - Signature changed
stable_baselines3.common.callbacks.ConvertCallback.__init__
Was def __init__(self, callback: Callable[[Dict[str, Any], Dict[str, Any]], bool], verbose: int = 0); now def __init__(self, callback: Optional[Callable[[Dict[str, Any], Dict[str, Any]], bool]], verbose: int = 0). pypi.org - Signature changed
stable_baselines3.common.env_util.AtariWrapper
Was class AtariWrapper(gym.Wrapper); now class AtariWrapper(gym.Wrapper[np.ndarray, int, np.ndarray, int]). pypi.org - Signature changed
stable_baselines3.common.env_util.is_wrapped
Was def is_wrapped(env: Type[gym.Env], wrapper_class: Type[gym.Wrapper]) -> bool; now def is_wrapped(env: gym.Env, wrapper_class: Type[gym.Wrapper]) -> bool. pypi.org - Signature changed
stable_baselines3.common.env_util.SubprocVecEnv.get_images
Was def get_images(self) -> Sequence[np.ndarray]; now def get_images(self) -> Sequence[Optional[np.ndarray]]. pypi.org - Signature changed
stable_baselines3.common.env_util.SubprocVecEnv.seed
Was def seed(self, seed: Optional[int] = None) -> List[Union[None, int]]; now def seed(self, seed: Optional[int] = None) -> Sequence[Union[None, int]]. pypi.org
And 77 more in this version. Sign up to see every change
stable-baselines3 1.0 breaking changes
- Removed
stable_baselines3.common.cmd_util
The stable_baselines3.common.cmd_util module was removed because it was already deprecated. Import from env_util instead. github.com - Removed
stable_baselines3.common.policies.is_image_space
stable_baselines3.common.policies.is_image_space was removed in stable-baselines3 1.0 pypi.org - Removed
stable_baselines3.common.policies.VecTransposeImage
stable_baselines3.common.policies.VecTransposeImage was removed in stable-baselines3 1.0 pypi.org - Behavior changed
HER
A planned refactor of HER, together with dictionary observation support, will be backward incompatible: models trained with the previous HER version will not work with the new version. github.com - Signature changed
stable_baselines3.common.base_class.BaseAlgorithm.load
Was @classmethod def load(cls, path: Union[str, pathlib.Path, io.BufferedIOBase], env: Optional[GymEnv] = None, device: Union[th.device, str] = 'auto', **kwargs) -> BaseAlgorithm; now @classmethod def load(cls, path: Union[str... pypi.org - Signature changed
stable_baselines3.common.base_class.load_from_zip_file
Was def load_from_zip_file(load_path: Union[str, pathlib.Path, io.BufferedIOBase], load_data: bool = True, device: Union[th.device, str] = 'auto', verbose: int = 0) -> Tuple[Optional[Dict[str, Any]], Optional[TensorDict]... pypi.org - Signature changed
stable_baselines3.common.off_policy_algorithm.BaseAlgorithm.load
Was @classmethod def load(cls, path: Union[str, pathlib.Path, io.BufferedIOBase], env: Optional[GymEnv] = None, device: Union[th.device, str] = 'auto', **kwargs) -> BaseAlgorithm; now @classmethod def load(cls, path: Union[str... pypi.org - Signature changed
stable_baselines3.common.save_util.load_from_zip_file
Was def load_from_zip_file(load_path: Union[str, pathlib.Path, io.BufferedIOBase], load_data: bool = True, device: Union[th.device, str] = 'auto', verbose: int = 0) -> Tuple[Optional[Dict[str, Any]], Optional[TensorDict]... pypi.org - Signature changed
stable_baselines3.HER.load
Was @classmethod def load(cls, path: Union[str, pathlib.Path, io.BufferedIOBase], env: Optional[GymEnv] = None, device: Union[th.device, str] = 'auto', **kwargs) -> BaseAlgorithm; now @classmethod def load(cls, path: Union[str... pypi.org
stable-baselines3 0.11.0 breaking changes
- Removed
stable_baselines3.common.off_policy_algorithm.OffPolicyAlgorithm.n_episodes_rollout
OffPolicyAlgorithm.n_episodes_rollout was removed in stable-baselines3 0.11.0 pypi.org - Removed
stable_baselines3.common.type_aliases.VecEnv
stable_baselines3.common.type_aliases.VecEnv was removed in stable-baselines3 0.11.0 pypi.org - Removed
stable_baselines3.ddpg.ddpg.OffPolicyAlgorithm.n_episodes_rollout
OffPolicyAlgorithm.n_episodes_rollout was removed in stable-baselines3 0.11.0 pypi.org - Renamed
stable_baselines3.common.vec_env.is_wrapped
Use stable_baselines3.common.vec_env.is_vecenv_wrapped instead. pypi.org - Signature changed
stable_baselines3.A2C.__init__
Was def __init__(self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str], learning_rate: Union[float, Callable] = 0.0007, n_steps: int = 5, gamma: float = 0.99, gae_lambda: float = 1.0, ent_coef: float = 0.0, vf_coef... pypi.org - Signature changed
stable_baselines3.a2c.a2c.A2C.__init__
Was def __init__(self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str], learning_rate: Union[float, Callable] = 0.0007, n_steps: int = 5, gamma: float = 0.99, gae_lambda: float = 1.0, ent_coef: float = 0.0, vf_coef... pypi.org - Signature changed
stable_baselines3.a2c.a2c.ActorCriticPolicy.__init__
Was def __init__(self, observation_space: gym.spaces.Space, action_space: gym.spaces.Space, lr_schedule: Callable[[float], float], net_arch: Optional[List[Union[int, Dict[str, List[int]]]]] = None, activation_fn: Type[nn.Module] = nn.Tanh... pypi.org - Signature changed
stable_baselines3.a2c.a2c.OnPolicyAlgorithm.__init__
Was def __init__(self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str], learning_rate: Union[float, Callable], n_steps: int, gamma: float, gae_lambda: float, ent_coef: float, vf_coef: float, max_grad_norm: float... pypi.org - Signature changed
stable_baselines3.a2c.policies.ActorCriticCnnPolicy.__init__
Was def __init__(self, observation_space: gym.spaces.Space, action_space: gym.spaces.Space, lr_schedule: Callable, net_arch: Optional[List[Union[int, Dict[str, List[int]]]]] = None, activation_fn: Type[nn.Module] = nn.Tanh, ortho_init... pypi.org - Signature changed
stable_baselines3.common.base_class.BaseAlgorithm.__init__
Was def __init__(self, policy: Type[BasePolicy], env: Union[GymEnv, str, None], policy_base: Type[BasePolicy], learning_rate: Union[float, Callable], policy_kwargs: Dict[str, Any] = None, tensorboard_log: Optional[str] = None, verbose: int... pypi.org
And 54 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.