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
ObsUtils.unprocess_obs_dict() modifies obs dict in-place #41
Comments
Great catch - thanks for reporting this bug! We will PR a fix soon. |
Awesome! Thanks. |
Would you be able to send over a trained model on one of our datasets so that we can reproduce this issue easily? Or even confirm that it breaks with one of our models (see here) |
Does this work? https://drive.google.com/file/d/1QyN5YyZYhzJRAUcTPmRGmebkpyh_9-hy/view?usp=sharing |
Fixed in #71 |
The
ObsUtils.unprocess_obs_dict()
seems to modify the observation dictionary that is passed in, in addition to returning it. For example, I observed that in the lines referenced below,next_obs
images are between 0 and 1, while after line 147,next_obs
images are between 0 and 255. This leads to a problem, asobs
is derived fromnext_obs
, which means that in the next loop around, we will pass already unprocessed images intounprocess_obs_dict()
. This has led to some significant issues, as the saved images are corrupted from what is observed. As a simple fix, I wrapped thenext_obs
indeepcopy(next_obs)
on line 147.robomimic/robomimic/scripts/run_trained_agent.py
Lines 142 to 147 in b5d2aa9
The text was updated successfully, but these errors were encountered: