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
0
votes
0 answers
Is there possibility of treating reward as multi-dimensional reward vector?
In my custom environment stable baseline3 I am seeking advice, In my numerical tree dimensional observation_space, Is there possibility of treating each reward separately? i.e. reward vector instead of single numeric reward value?
class…

Bhalchandra Madhekar
- 11
- 1
0
votes
0 answers
Seeking a sample RL code using Stable Baselines 3 and Gym to fully utilize my RTX 3080 GPU
I have successfully set up my environment with the necessary installations and confirmed that both PyTorch and TensorFlow have access to CUDA. However, when I train my model using Stable Baselines 3 and Gym, it only utilizes around 10% of my CPU,…

Akbar Ali
- 1
- 1
0
votes
0 answers
Observation Space when using Custom State Objects in stable-baselines
I am attempting to define a custom environment for my RL problem in stable-baselines. Each state is represented by a custom data type, with the space consisting of trillions of these objects, and the actions are discrete. How do I define the…

Nitin Prasad
- 11
- 1
0
votes
0 answers
How to make the rollout of a stable baseline scroll up and eval appear
I'm doing some agent training with stable baseline3, but rollout doesn't scroll up and eval doesn't appear, I'm new to this, please advise more.
I want the program to work.

ww0910
- 1
0
votes
1 answer
Create Custom Policy using stable baseline3
I am trying to create a custom lstm policy. It seems that BasePolicy is missing. How can we create a custom LSTM policy to pass to PPO or A2C algorithm. Also, if not, can modify the layer of lstm in the current setting that will help in customizing…

Kundan Kumar
- 1
- 1
0
votes
1 answer
A2C and stable_baselines3
I´m trying to use this code from a repo in GitHub (https://github.com/nicknochnack/Reinforcement-Learning-for-Trading-Custom-Signals/blob/main/Custom%20Signals.ipynb) in Point 3:
model = A2C('MlpLstmPolicy', env,…

Unagi71
- 1
- 3
0
votes
1 answer
stable_baselines3 PPO won't learn
I've written code for moving a target object towards a specific goal position on a 2D surface. However, when I run it, the cart doesn't move towards the object or the goal position at all. It just gets stuck in a loop and so the program never…

H-Man
- 1
0
votes
0 answers
How to implement a _train_step method for RecurrentPPO in SB3-Contrib to perform Continual Learning?
I want to add a _train_step method to RecurrentPPO from SB3-Contrib (see here : https://github.com/Stable-Baselines-Team/stable-baselines3-contrib). This method was available in hIll-a Stable Baselines 1 for PPO2 (see here :…

GerardL
- 81
- 7
0
votes
0 answers
How to get Q value for each action in stable-baselines 2
Assuming I have a well-trained DQN model and observations. How can I get the Q-value for each potential action by input the current observations.
I am expecting something like the following:
model = DQN.load("dqn_cartpole")
env =…
0
votes
1 answer
Resume training for stable baseline model PPO
I wonder if I can resume training from checkpoints after saving logs in stable baseline as from what I understood from the documentation that CheckpointCallback can work as snapshots (yet not sure about this)
This code creates logs but I am not sure…

user21261404
- 3
- 2
0
votes
1 answer
Stable Baselines 3: Default parameters
I am running some simulations using PPO and A2C algorithms from Stablebaselines3 with openai-gym.
I know that i can customize all of them, but i was wondering which are the default parameters.
Specially the network structure and learning…

Samuel
- 3
- 2
0
votes
0 answers
How to make sense of stable baselines 3 utils and vectorization regarding shapes
I want to setup and pre-process a gym environment with stable baselines 3 and then write my own code for the agent but I have trouble making sense of stable baselines documentation. This leads to not fully understanding what I'm doing and errors…

henrycmcjo
- 93
- 5
0
votes
1 answer
Openai gym window wont close on env close
I am trying to implement simple cart pole code but pygame window doesnt close on env.close and freezes. When i try to manually close, it is restarting kernel. This is my code :
env = gym.make("CartPole-v1", render_mode = "human")
episodes = 5
for…

Yigit Kaya
- 23
- 4
0
votes
1 answer
Custom Network and Policy in Stable-Baselines3
I am attempting to create a small working example of how to use MultiDiscrete actions spaces together with a Box observation space. One of the problems that I have run into is that the dimension returned by utilizing a normal policy does not fit…

AliG
- 73
- 6
0
votes
1 answer
Comparison of trained model in stable baseline 3 with another policy
I want to compare a trained model in stable-baseline 3 (SB3) with another one ( a base algorithm) and see how it performs on the same episode. However I am having issues with the evaluate_policy function on the BasePolicy.
Here is a small…

APaul31
- 38
- 5