8000 enjoy.py throws error about observation space with HalfCheetahBulletEnv-v0 and own saved model · Issue #64 · araffin/rl-baselines-zoo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
8000
Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
This repository was archived by the owner on May 9, 2025. It is now read-only.
enjoy.py throws error about observation space with HalfCheetahBulletEnv-v0 and own saved model #64
Closed
@kncrane

Description

@kncrane

Hi,

Playing around with stable baselines 2.9.0 (installed with pip) on Ubuntu 18.04.4 LTS with Python 3.6.9, gym 0.16.0, tensorflow 1.14.0 and pybullet 2.6.5.

When I run

python enjoy.py --algo ppo2 --env HalfCheetahBulletEnv-v0 -- folder trained_agents/ -n 150000

all is well.

When I run

python enjoy.py --algo ppo2 --env HalfCheetahBulletEnv-v0 -- folder logs/ -n 150000

so that enjoy.py loads the model I have trained and saved with train.py, I get the following error..

"Error: the environment passed must have at least the same observation space as the model was trained on."

When I've been trying to see what the problem is today I've noticed that, because of the stored hyperparameters for ppo2 HalfCheetahBulletEnv-v0, train.py wraps the training environment in the TimeFeatureWrapper wrapper from utils/wrappers.py but enjoy.py does not because end up going into the elif "Bullet" in env_id: statement in the create_test_env() method in utils/utils.py.

I've looked and the wrapper changes the observation space from (26,) to (27,) so that may be what it is complaining about in the error message.

Am I barking up the right tree and how come the error doesn't occur with the zoo trained_agents saved models?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0