-
Notifications
You must be signed in to change notification settings - Fork 328
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
[BugFix,Refactor] Dreamer refactor #1918
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/1918
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New Failures, 11 Unrelated FailuresAs of commit 7733c37 with merge base 0ea236d (): NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -2421,6 +2421,10 @@ def _rollout_stop_early( | |||
tensordict = tensordict.to(policy_device, non_blocking=True) | |||
else: | |||
tensordict.clear_device_() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to backprop anything in this loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a transform to the mb env,
can you confirm that we always want to detach these values in mbenv.step
?
frames_per_batch=cfg.collector.frames_per_batch, | ||
total_frames=cfg.collector.total_frames, | ||
device=cfg.collector.device, | ||
reset_at_each_iter=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should set the horizon instead
return ( | ||
-0.5 * ((x.to(mean.dtype) - mean) / std).pow(2) - std.log() | ||
) # - 0.5 * math.log(2 * math.pi) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's the equation of the normal log prob if you're interested. It's a distance loss as you can see
Description
Updates the dreamer example to be aligned with other example scripts and prove paper performance.
Adds the option to run dreamer with non-image obs environments and fixes small issues in the objective and other elements.
Motivation and Context
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
You can use the syntax
close #15213
if this solves the issue #15213Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!