Comments (10)
Hello,
Thanks for reporting the issue.
Could you please follow the issue template and provide a minimal yet complete code to reproduce the error?
from stable-baselines.
Hi @araffin ,
Updated the main topic to your request. Sorry.
from stable-baselines.
Hello,
Thanks for the update.
I suspect your issue is related to this one: openai/gym#1191
What is your gym version?
from stable-baselines.
Hi again!
My gym version is: 0.10.5
I tried printing the shape upon env creation and on dummy_vec_env, just one line before the place where the error is thrown, and they output the same shape, but inline with the bug you identified:
Original shape: ((2, 2),)
Env: ((2, 2),)
Hsa the new version fixed it?
from stable-baselines.
Are you sure you are using 0.10.5
? Did you install it with pip?
On my computer, the following code raises an error (with this gym version):
spaces.MultiDiscrete([[0, 12], [0, 250]])
AssertionError: nvec should be a 1d array (or list) of ints
What you want to do is:
spaces.MultiDiscrete([12, 250])
no ? (12 and 250 discrete actions)
from stable-baselines.
That's strange, yes I installed it via Pip and it is definitely 0.10.5
.
I never got an error, it is how the Hands‑On Intelligent Agents with OpenAI Gym
book defines the space is to be used, but, I have changed it to your recommendation (although I'm working with an observation space, not an action space but I take it its the same), and the problem persists, exactly as before.
from stable-baselines.
I never got an error
I created a colab notebook so you can reproduce the error (with gym 0.10.5): https://colab.research.google.com/drive/1KDWriJMxBv8rtqjvGEu6Qz9bzZvtKt-B
With the latest version of gym (0.10.8), there is no error but the shape is changed (and that causes the error in the vec env): https://colab.research.google.com/drive/1oDOxpECm5mU-joHy_lnLwPGBQkgTaHCh
I have changed it to your recommendation
If you don't have any error with your original, then my recommendation won't work anyway.
from stable-baselines.
Ah I see.
Should I then use an older gym version before the shape is changed?
from stable-baselines.
Yes,
I would recommend using 0.10.5 (with my recommendation for declaring the space).
I am waiting for OpenAI answer. If breaking things (i.e. no backward compatibility) is what they wanted, we will have to patch stable-baselines, otherwise, we will wait for a fix from gym.
from stable-baselines.
You are right.
All fixed up, thank you for your help. Hopefully they will fix their end soon enough.
Now to get SubprocEnv working, which seems to not work. I'll run some more testing and open a new issue if needed.
Once again, thank you.
from stable-baselines.
Related Issues (20)
- [question] PPO load using .pkl file HOT 1
- How to create an actor-critic network with two separate LSTMs
- Can I use an agent with act, and observe interactions with no/minimum use of environment?
- #question _on_step method in custom callback
- DQN report. [QUESTION]
- [question] TypeError: 'NoneType' object is not callable with user defined env
- python setup.py egg_info did not run successfully.
- [Question] Can I train agents in a nested loop in SB3?
- Dimension mismatch with when using custom Feature Extractor
- assertionerror, observation space , vectransposeimage
- Customize training process
- VecNormalize 'training' attribute
- Resume Training on Checkpoint HOT 1
- Model generated using VecNormalize, model predict use case HOT 1
- MlpPolicy network output layer softmax activation for continuous action space problem? HOT 2
- Two similar custom environment, PPO learns on both but SAC only on one HOT 1
- resume the training
- Using Multiple environment with unity ML agents
- AssertionError: The observation returned by the `step()` method does not match the given observation space Discrete(2)
- Questions about CNN policy input channel [question]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-baselines.