Comments (3)
Hi,
I kind of encountered a very similar problem when I tried to load a trained model from HuggingFace for PickandPlace-v1. Could you please tell me how you solved this problem of observation space mismatch?
from panda-gym.
Can you share the code used ? What version of sb3 and panda-gym do you use?
from panda-gym.
Thanks for your quick reply!
Below is the code I ran:
test_env = gym.make("PandaPickAndPlace-v1", render=False)
checkpoint = load_from_hub(repo_id="sb3/tqc-PandaPickAndPlace-v1", filename="tqc-PandaPickAndPlace-v1.zip")
model = TQC.load(checkpoint, env=test_env)
After I ran the code in the terminal, it complained that
raise ValueError(f"Observation spaces do not match: {observation_space} != {env.observation_space}") ValueError: Observation spaces do not match: Dict('achieved_goal': Box(-10.0, 10.0, (3,), float32), 'desired_goal': Box(-10.0, 10.0, (3,), float32), 'observation': Box([-10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. -10. 0.], [10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 1.], (20,), float32)) != Dict('achieved_goal': Box(-10.0, 10.0, (3,), float32), 'desired_goal': Box(-10.0, 10.0, (3,), float32), 'observation': Box(-10.0, 10.0, (19,), float32))
For your information, I used the stablebaselines3 of version 2.1.0 and panda_gym of version 1.1.1
I also tried to load the model you uploaded to the huggingface by using the code:
test_env = gym.make("PandaPickAndPlace-v1", render=False)
checkpoint = load_from_hub(repo_id="qgallouedec/tqc-PandaPickAndPlace-v1-4094880237", filename=" tqc-PandaPickAndPlace-v1.zip")
model = TQC.load(checkpoint, env=test_env)
Then this time it complained that
raise KeyError("The observation_space and action_space were not given, can't verify new environments") KeyError: "The observation_space and action_space were not given, can't verify new environments"
Could you please tell me what I should do to solve these issues?
from panda-gym.
Related Issues (20)
- Question about task observation HOT 2
- Question regarding end-effector control HOT 1
- Cannot change the viewpoint for render. HOT 1
- Hyperparameters for PickAndPlace HOT 1
- PandaPickAndPlace-v3 Training and Hyperparameters HOT 11
- The issue about the orientation get from getLinkState(). HOT 2
- Can I render/reset an environment based on a specific observation? HOT 1
- pybullet.error: Error loading texture HOT 6
- When is it panda-gym going to be compatible with python 3.11? HOT 1
- how to realize the sb3 train demo code with panda-gym? HOT 2
- Typo in the `core.py` script HOT 1
- Render screen is out of sync HOT 6
- `NAN` in the training HOT 1
- How to get `predict` data from a saved model? HOT 2
- TypeError: catching classes that do not inherit from BaseException is not allowed HOT 6
- Shape of `achieved_goal` and `desired_goal` HOT 6
- Discussion about the future work HOT 9
- Decreasing Size of Action Space HOT 2
- Compatibility of gym-0.24 branch? HOT 2
- panda-gym v2 error; "TypeError: catching classes that do not inherit from BaseException is not allowed". HOT 2
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 panda-gym.