Questions tagged [stable-baselines]

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.

277 questions
0
votes
1 answer

Evaluate_policy records much higher mean reward then stable baselines 3 logger

As the title says, I am testen PPO with the Cartpole Environment using SB3, but if I look at the performance measured be the evaluate_policy function I reach a mean reward of 475 reliable at 20000 timesteps, but I need about 90000 timesteps if I…
0
votes
1 answer

Is it possible to set the exploration rate to 0, and turn off network training for a Stable Baselines 3 algorithm?

After training a stable baselines 3 RL algorithm (I am using mainly PPO) I want to set the exploration rate to 0, and turn off network training so I always get the same output (action) from the model when given the same input (observation). Is it…
HaakonFlaar
  • 387
  • 2
  • 4
  • 15
0
votes
1 answer

Error while rendering in the gym environment

I'm trying to work for a RL project where I need to test the ideas in some Atari environement and I choose Pong to test the initial ideas. I'm using stable-baselines3 version 1.6.2 for ease of convenience. My gym version is 0.21.0. But I'm getting…
0
votes
1 answer

StableBaselines creating a model segmentation fault

I am getting a segmentation fault when trying to create a stable_baselines3 PPO model on a CartPole-v1 OpenAI Gym environment. So far what I've tried is running a short example code on Python 3.10 as well as Python 3.9. I'm running the python script…
Ilija Vuk
  • 299
  • 3
  • 11
0
votes
0 answers

No registered env with id: PongNoFrameskip-v4

I'm using Stable Baselines3 for my project. I'm a newbie and haven't used Stable Baselines3 before. But unfortunately, I'm not able to continue due to the following error, No registered env with id: PongNoFrameskip-v4 I installed Stable Baselines3…
0
votes
0 answers

Vectorize custom RL stable.baselines3 environment from pygame and display the output of all

This is my first custom RL stable.baselines3 project so feel free to ask for more information. It's a Snake game. I want to create 4 environments which train the model simultaneously and see all 4 outputs. Ideally in a 2x2 grid in one pygame…
0
votes
1 answer

What is the best way to model an environment to force an agent to select `x out of n` choices?

I have an RL problem where I want the agent to make a selection of x out of an array of size n. I.e. if I have [0, 1, 2, 3, 4, 5] then n = 6 and if x = 3 a valid action could be [2, 3, 5]. Right now what I tried is have n scores: Output n continuous…
Olli
  • 906
  • 10
  • 25
0
votes
1 answer

Is there a way to read/print the activations of the hidden layers of a Neural Network in Stable Baselines?

A central requirement for the project I am working on is being able to read the activations of the neurons in the hidden layers of the PPO2 models that I trained using the Stable Baselines library. Here is a very related question. I would like to…
0
votes
0 answers

stable baseline, how can we sample reproducible env value with each episode

Iam trying to use DDPG (stable baseline3) to solve a problem. I would like to know, how can we change the env sampled values with every episode "and it should be reproducible", using stable baseline. for example, assume we have an env where we…
missou
  • 1
  • 1
0
votes
2 answers

How to train a RL agent in multiple episodes

how can I create a RL agent that has to perform on ex 1000 different episodes of 200 time steps each? Using gym-anytrading and stable-baselines3
0
votes
0 answers

Stable Baselines PPO algorithm crashes due to RuntimeError: Calling torch.geqrf on a CPU tensor requires compiling PyTorch with LAPACK

I tried to run a PPO algorithm from the stable-baselines3 library on a basic gym environment on my local CPU, however I get the following RuntimeError: RuntimeError: Calling torch.geqrf on a CPU tensor requires compiling PyTorch with LAPACK. Please…
0
votes
0 answers

Using explained variance to stop model training early, like StopTrainingOnRewardThreshold

I am trying to learn Python by building an RL Forex trading bot using TensorFlow and StableBaselines3. I want to stop the training of my model early, based on a combination of the built-in StopTrainingOnRewardThreshold callback and the explained…
0
votes
0 answers

Stable Baselines RL Training: Error "TypeError: type numpy.ndarray doesn't define __round__ method"

model = PPO("MlpPolicy", normalized_env, verbose=1, tensorboard_log="./RL_SHS_tensorboard/") model.learn(204800, tb_log_name= "run_ppo") model.save("ppo_shs") /usr/local/lib/python3.7/dist-packages/stable_baselines3/common/monitor.py in step(self,…
0
votes
0 answers

Resolving positional argument problems w intersection of Google Colab, TensorFlow, Stable Baselines compatibility issues

https://colab.research.google.com/drive/1ZmFhb0j0yqPuMtgrkeqYkQ3v8qm0Xr1l?usp=sharing Up until several weeks ago, this Google Colab notebook worked fine - all it is is setting up a Gym environment, having the agent randomly choose actions, and then…
0
votes
1 answer

How do I go about this error in Open AI Gym and stable_baselines3?

I am learning Reinforcement Learning in Python with Stable Baselines 3 referencing a tutorial by sentdex. The problem when I run check the code using check_env()I get an error AssertionError: The observation returned by the reset() method does not…