Git Product home page Git Product logo

Comments (3)

MH-Hou avatar MH-Hou commented on June 16, 2024

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.

qgallouedec avatar qgallouedec commented on June 16, 2024

Can you share the code used ? What version of sb3 and panda-gym do you use?

from panda-gym.

MH-Hou avatar MH-Hou commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.