Stable Baselines is a library with implementations of various reinforcement learning algorithms in Python, developed by OpenAI. Please mention the exact version of Stable Baselines that is being used in the body of the question.
Questions tagged [stable-baselines]
277 questions
2
votes
1 answer
StableBaselines-3 DDPG + HER Multiprocessing
I was reading documentation about HER and also about Multiprocessing in stable-baselines3 website
However when i try to train it throws a error!
Is there any example anywhere with multiprocessing with replay_buffer??
num_cpu = 4
env =…

Edvards Zakovskis
- 21
- 2
2
votes
1 answer
gym MultiDiscrete space and A2C stable-baseline
I am implementing an RL agent based on A2C of stable-baseline3 on a gym environment with MultiDiscrete observation and action spaces.
I get the following error when learning
RuntimeError: Class values must be smaller than num_classes.
This is a…

mercury24
- 53
- 1
- 9
2
votes
0 answers
How to do RL+graph neural network using stable-baselines3
I am new to stable-baselines3 and am trying to get a toy graph neural network problem to work. I previously had a bit flipping example using an array. The problem is this: given a list of 10 random bits and an operation which flips a bit find a…

Simd
- 19,447
- 42
- 136
- 271
2
votes
0 answers
Modifying the loss in ppo in stable-baselines3
I'm trying to implement an addition to the loss function of the ppo algorithm in stable-baselines3. For this I collected additional observations for the states s(t-10) and s(t+1) which I can access in the train-function of the PPO class in ppo.py as…

NoKryst13
- 21
- 2
2
votes
0 answers
Can I create a contextual Multi-Armed Bandit Agent in SB3?
I wonder if it is possible to create an agent equivalent to a contextual Multi-Armed Bandit using the SB3 library.
It seems to me a much simpler agent, but checking the library documentation they say they don't cover that kind of algorithm, and I…

Angelo
- 575
- 3
- 18
2
votes
2 answers
PyCharm install package with square brackets
I want to install "stabe-baselines3[extra]"
But in the PyCharm Package installer is only "stable-baselines3" available.
When try to install it via 'pip install' I do get this error:
Translation: 'pip' is not recognized as an internal or external…

msba
- 141
- 1
- 8
2
votes
0 answers
How the rewards are incorporated into the learning process?
I have an environment in which I am trying to learn the system dynamics using baseline3 library. Since my example is quite big, I am using the following example to clarify the problem I have.
The problems
Where actually environment reword…

GPrathap
- 7,336
- 7
- 65
- 83
2
votes
2 answers
SubprocVecEnv not working with Custom Env (Stable Baselines - Gym)
I've made a custom env using gym.Env as parent class and everything works well running single core. I've started the code as follows:
class MyEnv(gym.Env):
....
But if I try to use SubprocVecEnv to accelerate the learning process using all my 24…

Guitar AI
- 121
- 1
- 7
2
votes
1 answer
Stable Baselines: DQN Not performing properly?
I have problem in using DQN for a diagonal line and sin wave as price fluctuation. When the price goes up, there will be a reward and it is colored as green in the chart. When the price goes down and it is tagged as red, the reward goes up. Please…

toksis
- 139
- 1
- 4
- 14
2
votes
1 answer
Pytorch - RuntimeError: invalid multinomial distribution (encountering probability entry < 0)
I am using Stable Baselines 3 to train an agent to play Connect 4 game. I am trying to take the case into account when an agent starts a game as a second player.
self.env = self.ks_env.train([opponent, None])
When I am trying to run the code, I am…

Joe Rakhimov
- 4,713
- 9
- 51
- 109
2
votes
2 answers
Can I install Tensorflow 1.15 with GPU support on Ubuntu 20.04.1 LTS?
I am building a Deep Learning rig with a GeForce RTX 2060.
I am wanting to use baselines-stable which isn't tensorflow 2.0 compatible yet.
According to here and here, tensorflow-gpu-1.15 is only listed as compatible with CUDA 10.0, not CUDA…

Joshua
- 1,185
- 14
- 23
2
votes
1 answer
Unexpected action distribution for custom RL environment
I am working on creating a custom environment and training a RL agent on it.
I am using stable-baselines because it seems to implement all the latest RL algorithms, and seems to be as close to "plug and play" as possible (I'd like to concentrate on…

bastien girschig
- 663
- 6
- 26
2
votes
1 answer
stable-baseline with tensorflow issue
It says: Stable-Baselines supports Tensorflow versions from 1.8.0 to 1.15.0, and does not work on Tensorflow versions 2.0.0 and above.
So I tried to install "sudo pip3 install tensorflow==1.15.0"
But I get the message:
ERROR: Could not find a…

Caspar Bm
- 258
- 4
- 12
2
votes
1 answer
How does LazyFrames from OpenAI's baselines save memory?
OpenAI's baselines use the following code to return a LazyFrames instead of a concatenated numpy array to save memory. The idea is to take the advantage of the fact that a numpy array can be saved at different lists at the same time as lists only…

Maybe
- 2,129
- 5
- 25
- 45
1
vote
1 answer
How to integrate stable_baselines3 with dagshub and MLflow?
I am trying to integrate stable_baselines3 in dagshub and MlFlow. I am new to MLOPS
Here is a sample code that is easy to run:
import mlflow
import gym
from gym import spaces
import numpy as np
from stable_baselines3 import PPO
import…

TheGainadl
- 523
- 1
- 6
- 14