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
11
votes
1 answer

How to load a trained TF1 protobuf model into TF2?

Update: This is a bug in tensorflow. Track progress here. I have created and trained a model using stable-baselines, which uses Tensorflow 1. Now I need to use this trained model in an environment where I only have access to Tensorflow 2 or…
VSZM
  • 1,341
  • 2
  • 17
  • 31
8
votes
1 answer

Stable Baselines3 RuntimeError: mat1 and mat2 must have the same dtype

I am trying to implement SAC with a custom environment in Stable Baselines3 and I keep getting the error in the title. The error occurs with any off policy algorithm not just SAC. Traceback: File "\src\main.py", line 70, in…
Theo Michail
  • 157
  • 1
  • 1
  • 11
6
votes
3 answers

Stable Baselines3 Parameter Logits has invalid values

I am trying to run stable baselines on sports games but keep getting the following error Traceback (most recent call last): File "/home/dev/Desktop/Projects/AI/NBA2/stable_baselines_run.py", line 35, in
6
votes
1 answer

What does "deterministic=True" in stable baselines3 library means?

I am trying to apply the PPO algorithm from the stable baselines3 library https://stable-baselines3.readthedocs.io/en/master/ to a custom environment I made. One thing I don't understand is the following line: mean_reward, std_reward =…
mac179
  • 1,540
  • 1
  • 14
  • 24
5
votes
1 answer

Why multiprocessing in Stable Baselines 3 is slower?

I took multiprocessing example for Stable Baselines 3 and everything was fine. https://colab.research.google.com/github/Stable-Baselines-Team/rl-colab-notebooks/blob/sb3/multiprocessing_rl.ipynb#scrollTo=pUWGZp3i9wyf Multiprocessed training took…
5
votes
2 answers

LSTM based policy in stable baselines3 model

I am trying to make a PPO model using the stable-baselines3 library. I want to use a policy network with an LSTM layer in it. However, I can't find such a possibility on the library's website although it exists on the previous version of…
mac179
  • 1,540
  • 1
  • 14
  • 24
5
votes
3 answers

Stable-Baselines3 log rewards

How can I add the rewards to tensorboard logging in Stable Baselines3 using a custom environment? I have this learning code model = PPO( "MlpPolicy", env, learning_rate=1e-4, policy_kwargs=policy_kwargs, verbose=1, …
Mario
  • 13,941
  • 20
  • 54
  • 110
5
votes
0 answers

Alternatives of Stable Baselines3

can you suggest some alternative of stable baselines that I can use to train my agent in reinforcement learning. P.s. I'm using gym mini-grid environment so tell me those who work in this environment.
5
votes
2 answers

How to get action_propability() in stable baselines 3

I am just getting started self-studying reinforcement-learning with stable-baselines 3. My long-term goal is to train an agent to play a specific turn-based boardgame. Currently I am quite overwhelmed with new stuff, though. I have implemented a…
Marian Aldenhövel
  • 677
  • 1
  • 6
  • 24
5
votes
3 answers

Stable Baselines doesn't work with tensorflow

So I recently got back into machine learning, and decided to start the Kaggle course for "ConnectX" (https://www.kaggle.com/learn/intro-to-game-ai-and-reinforcement-learning). I am trying to do lesson 4, in which I use stable-baselines + Tensorflow…
Ayush Garg
  • 2,234
  • 2
  • 12
  • 28
4
votes
1 answer

How to get the Q-values in DQN in stable baseline 3?

I have an observation space in the format of Box but is actually defined as numpy array. For example: Box(low=np.array([0, 0, 0]), high=np.array([15, 10,150])) Now I want to get the q_value for a single observation, but since the observation is Box…
naizz
  • 77
  • 5
4
votes
1 answer

Add a TensorBoard metric from my PettingZoo environment

I'm using Tensorboard to see the progress of the PettingZoo environment that my agents are playing. I can see the reward go up with time, which is good, but I'd like to add other metrics that are specific to my environment. i.e. I'd like TensorBoard…
4
votes
4 answers

stable_baselines module error -> 'gym.logger' has no attribute 'MIN_LEVEL'

I am trying to use stable_baselines, but any model I try to use gives me the same error: module 'gym.logger' has no attribute 'MIN_LEVEL' I have attached an example from their website that is giving me the same error. I tried looking online but…
4
votes
1 answer

Stablebaselines3 logging reward with custom gym

I have this custom callback to log the reward in my custom vectorized environment, but the reward appears in console as always [0] and is not logged in tensorboard at all class TensorboardCallback(BaseCallback): """ Custom callback for…
Mario
  • 13,941
  • 20
  • 54
  • 110
4
votes
1 answer

How to create a live matplotlib.pyplot plot in google colab?

Unfortunately it is not possible to create live plots in a google colab notebook using %matplotlib notebook like it is in a offline jupyter notebook on my PC. I found two similar questions answering how to achieve this for plotly plots (link_1,…
1
2 3
18 19