Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZPickle of a Meta-World env does not produce the exact same env #426

Open
reginald-mclean opened this issue Jul 11, 2023 · 4 comments
Open

Comments

@reginald-mclean
Copy link
Collaborator

The arm position of the pickled env is incorrect for some reason

@pseudo-rnd-thoughts
Copy link
Member

Could you provide a script to reproduce

@reginald-mclean
Copy link
Collaborator Author

reginald-mclean commented Jul 12, 2023

import pickle
import numpy as np

mt1 = metaworld.MT1('assembly-v2', seed=5)
env = mt1.train_classes['assembly-v2']()
task = [task for task in mt1.train_tasks if task.env_name == 'assembly-v2'][0]
env.set_task(task)

pickled_env = pickle.loads(pickle.dumps(env))
obs1, _ = env.reset()
obs2, _ = pickled_env.reset()

assert np.all(np.equal(obs1, obs2))

@reginald-mclean
Copy link
Collaborator Author

This may also be fixed by #458

@reginald-mclean
Copy link
Collaborator Author

This seems to be an issue with where EZPickle is placed. Currently the init for EZPickle is placed in the Sawyer XYZ base class, but it may need to be moved into the individual classes for each environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants