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

Unable to see stable-baselines output?

Greetings! I am new to stable-baselines3, but I have watched numerous tutorials on its implementation and the custom environment formulation. After developing my model using gym and stable-baselines3 SAC algorithm, I applied (check_env) function to…
0
votes
1 answer

I'd like to get the episodic rewards in csv format in stable baselines 3

I want to retrieve the data after every episode, I've read the documentation that you can use, stable_baselines3.common.monitor.ResultsWriter but I don't know how to implement it in my code. import gym import numpy as np import…
0
votes
1 answer

How to I specify model.learn() to end within a certain episodes of stable baselines 3?

I know specifying that total_timesteps= is a require parameter, but how to I end model.learn() within a certain episodes? Forgive me for I'm still new to stables_baselines3 and pytorch still not how to implement it in code. import gym import numpy…
0
votes
1 answer

StableBaslines3 PPO model train() freezes?

I'm trying to have my RL model play a game, but I've encountered a peculiar problem. I am kind of new to all this, so maybe it's stupid, but: My environment and everything are set up nicely and when testing works like a charm. I can see the inputs…
0
votes
2 answers

The right way to install stable-baselines?

I am trying to install stable-baselines and run the first two lines from Getting Started section of the online manual but no option is working. I started with pip install stable-baselines Now when I run: import gym from…
Simd
  • 19,447
  • 42
  • 136
  • 271
0
votes
0 answers

How to use Numpy version 1.19.5 with Tensorflow and not get numpy.ndarray size changed error?

I have been trying to use stable_baselines on my new m1 chip computer; however, after installing all of the packages from some sample code I found, I kept getting this error ValueError: numpy.ndarray size changed, may indicate binary…
0
votes
1 answer

Reinforcement Learning - Custom environment implementation in Java for Python RL framework

I have a bunch of Java code that constitutes an environment and an agent. I want to use one of the Python reinforcement learning libraries (stable-baselines, tf-agents, rllib, etc.) to train a policy for the Java agent/environment. And then deploy…
ak.
  • 3,329
  • 3
  • 38
  • 50
0
votes
1 answer

How do I get openai.gym.spaces.Dict state updated?

"AttributeError: 'dict' object has no attribute 'flatten'". I get this error when I run the following code: import math from gym import Env from gym.spaces import Discrete, Box, Dict, Tuple, MultiBinary, MultiDiscrete from stable_baselines3 import…
0
votes
1 answer

GNN with Stable baselines

I am looking to use DGL or pytorch geometric for building my policy and value networks in stable baselines, however I am struggling to figure out how to send over observations. The observations must be one of the gym spaces class but I am not sure…
0
votes
1 answer

stable_baselines 3 doesn't store the tensorboard_log

I am just getting into reinforcement learning. My Model doesn't create any files in the given directory. What am i doing wrong? def train(): model = PPO('MlpPolicy', env, verbose=1, tensorboard_log=log_path) …
msba
  • 141
  • 1
  • 8
0
votes
1 answer

Stablebaselines MultiInputpolicies

I tried to use the MultiInputPolicy by : model = PPO("MultiInputPolicy", env, verbose = 1) But, I get an error: KeyError: "Error: unknown policy type MultiInputPolicy,the only registed policy type are: ['MlpPolicy', 'CnnPolicy']!" Please help.…
CMOS-Y
  • 3
  • 4
0
votes
1 answer

How to make the model learn in the loop using stable baselines3?

In the sample code from the stable baselines3 website (https://stable-baselines3.readthedocs.io/en/master/modules/ppo.html), the model first will learn via model.learn(total_timesteps=25000) line, then it can be used in the playing loop. Now, as I…
mac179
  • 1,540
  • 1
  • 14
  • 24
0
votes
0 answers

Use LSTM in stable baselines

I'm using PPO2 of stable baselines for RL. My observation space has a shape of (100,10), I would like to replace the network using in the policy by a LSTM, do u know if it's possible? Thanks
0
votes
1 answer

Custom Openai Gym Environment with Stable-baselines

I am trying to create a simple 2D grid world Openai Gym environment which agent is headed to the terminal cell from anywhere in the grid world. For example, in the 5x5 grid world, X is the current agent location and O is the terminal cell where…
HW Siew
  • 973
  • 8
  • 16
0
votes
1 answer

MlpPolicy only return 1 and -1 with action spece[-1,1]

I try to use Stable Baseliens train a PPO2 with MlpPolicy. After 100k timesteps, I can only get 1 and -1 in action. I restrict action space to [-1, 1] and directly use action as control. I don't know if it is because I directly use action as…
1 2 3
18
19