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

Support for saving/loading state #40

Open
floringogianu opened this issue Jan 26, 2020 · 1 comment
Open

Support for saving/loading state #40

floringogianu opened this issue Jan 26, 2020 · 1 comment

Comments

@floringogianu
Copy link

There are situations in which you would want to do a rollout from the current env state (say for estimating the return from that given state) and then continue from that point on. For mujoco envs you can do something along:

saved_state = env.sim.get_state()

# then on some other process or in a different routine
env.sim.set_state(saved_state)

I poked around the env object returned by gym.make() and there doesn't seem a way right now. Simply using deepcopy won't cut it. Any pointers towards how it could be implemented? I'd be willing to look into this.

@floringogianu
Copy link
Author

I dug up a bit and found this pybullet save/load example. It seems to be working fine in a multiprocessing environment when saving and loading state from disk. Couldn't make it work to restore from memory id.

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

1 participant