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

Can't import VecFrameStackFrame from Stable-baselines3 - importing problem

I have a problem when importing some dependencies from stable baselines 3 library, I installed it with this command pip install stable-baselines3[extra] But When I import my dependencies import gym from stable_baselines3 import A2C from…
0
votes
1 answer

No module named 'tensorflow.contrib' when importing A2C from stable_baselines

I'm trying to import A2C from stable_baselines using the following code line: from stable_baselines import A2C But I get the following error: ModuleNotFoundError: No module named 'tensorflow.contrib' I tried installing an old version of Tensorflow…
AidenFive
  • 29
  • 1
  • 7
0
votes
1 answer

StableBaselines3 neural network - why does performance drop/destabilize when I call model.learn() a second time?

I am using StableBaselines3 (based on PyTorch) to train a neural network for a Reinforcement Learning task. I am using Tensorboard to log the mean episode reward to track the training progress. However, I noticed something that doesn't make sense to…
0
votes
1 answer

PyTorch - How to specify an input layer? Is it included by default?

I am working on a Reinforcement Learning problem in StableBaselines3, but I don't think that really matters for this question. SB3 is based on PyTorch. I have 101 input features, and even though I designed a neural architecture with the first layer…
Vladimir Belik
  • 280
  • 1
  • 12
0
votes
1 answer

No module named 'stable_baseline3' even when it is installed in google colab

I am trying to set up stable baselines 3 in google colab. The document is connected to a local runtime on my pc through jupyter notebooks. On my pc i have installed stable baselines 3 using anaconda, and got the output saying essentially stable…
Mercury
  • 298
  • 1
  • 11
0
votes
1 answer

Stable_baseline3 PPO get "Process finished with exit code 139"

I use Stable_baseline3.PPO to train an agent on highway-fast-v0 (continues action type), and find that when calling ppo.learn() method, it is aborted with "Process finished with exit code 139" and no other error message. And this error is not occur…
0
votes
1 answer

Why does model.learn() return a numpy error?

I am trying to train my model, which is a breakout game in gym. I am trying to train the environment with 100000 timesteps. However, it keeps returning this error message. Can someone explain why and help me solve this? I am a beginner in machine…
user12585467
0
votes
0 answers

PongGame reinforcement learning with stable-baselines and pygame

I'm trying write PongGame AI with pygame and stable-baselines. Environment is ready and working. For the agent, im using custom env documentation stable-baselines (https://stable-baselines.readthedocs.io/en/master/guide/custom_env.html) But when i…
0
votes
1 answer

Stable-Baselines3 package, model.learn() function - how do total_timesteps and num_eval_episodes work together?

I am using the SB3 package for RL, and I'm trying out the model.learn() function. I don't understand exactly what model.learn() parameters do in terms of how they work together and with my environment. My RL is working from a tabular dataset, so…
Vladimir Belik
  • 280
  • 1
  • 12
0
votes
1 answer

Is it possible to expose replay buffer in A2C Stable Baselines 3 to include human judgements?

I am using A2C (Advantage Actor Critic) framework from stable-baselines3 (package link here) package for solving a reinforcement problem where reward is +1 or 0. I have an automatic mechanism to allocate reward to a choice in a given state. However,…
0
votes
1 answer

Error running model trained on cloud on local machine

I trained a reinforcement learning model using a GPU instance from Lambda Labs cloud service. The library I used for training is stable_baselines3. When I try to run the model on my local machine I get the following error which I can't figure out…
David
  • 487
  • 2
  • 6
  • 18
0
votes
1 answer

Stable Baselines3 - Setting "manually" the q_values

What I have done I'm using the DQN Algorithm in Stable Baselines 3 for a two players board type game. In this game, 40 moves are available, but once one is made, it can't be done again. I trained my first model with an opponent which would choose…
Lucas1283
  • 61
  • 1
  • 5
0
votes
1 answer

Unable to allocate memory with array shape to create reinforcement learning model

I am trying to create a DQN model for mario environment. But when I try to create the model it gives me this error: MemoryError: Unable to allocate 229. GiB for an array with shape (1000000, 1, 4, 240, 256) and data type uint8 This is the code for…
0
votes
1 answer

stable baselines action space

How to have multiple action space in stable baseline. My action space is a combination of Discrete and Box. I have tried gym.spaces.Tuple([gym.spaces.Discrete(5), gym.spaces.Box(low=0.001, high=1.0, shape=(1,))]) and gym.spaces.Dict but script seems…
Adeetya
  • 3
  • 1
  • 4
0
votes
1 answer

RL - Stable Baselines with PyTorch- DQN: Why does the CustomModel not learn?

I want to use the stable baseline RL implementation and use a custom model. I simplified my case. I have three questions: Why doesn't it learn to predict 2? Depending on the initialization it predicts 4, 7, 3, ... I would assume that…