-
Notifications
You must be signed in to change notification settings - Fork 309
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
[Algorithm] CrossQ #2033
[Algorithm] CrossQ #2033
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2033
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 1 Unrelated FailureAs of commit c010e39 with merge base a151923 (): NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
# Conflicts: # .github/unittest/linux_examples/scripts/run_test.sh
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.
thanks for this
There are just a couple of things to fix before merging
@BY571 we should also add it to the sota benchmarks |
import torch.nn as nn | ||
|
||
|
||
class BatchRenorm(nn.Module): |
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.
Let's put this in the modules no?
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.
and add it to the doc.
Happy to write a couple of tests.
Is it a copy paste? If so, can we check the license?
torchrl/objectives/crossq.py
Outdated
next_tensordict.set(self.tensor_keys.action, next_action) | ||
next_sample_log_prob = next_dist.log_prob(next_action) | ||
|
||
# TODO: separate forward pass seems faster than the combined. |
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.
Keep?
# Conflicts: # torchrl/envs/batched_envs.py
# Conflicts: # torchrl/envs/batched_envs.py
loss_function="l2", | ||
**kwargs, | ||
) | ||
sd = loss_fn.state_dict() |
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 check that this contains the values of the actor and qvalue nets
@BY571 examples CI is failing:
|
@vmoens updated :) |
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.
LGTM thanks a million for this
Description
Adding CrossQ
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!