-
Notifications
You must be signed in to change notification settings - Fork 478
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
[BE] Fix the env pause issue #1744
Conversation
@@ -302,6 +302,10 @@ def evaluate_agent( | |||
rgb_frames, | |||
) | |||
|
|||
# We pause the statefull parameters in the policy | |||
if any(envs_to_pause): |
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.
Why add this? Should on_envs_pause
should be able to handle empty lists of ends to pause?
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.
Same comment as Andrew, I think you dont need the if condition and can always call envs_to_pause with empty list. Unless the reason is efficiecny in not doing these checks.
Thanks for the fix!
@xavierpuigf and @ASzot Thanks for the review! I noticed that this code (
if any(envs_to_pause):
Maybe we could add a check inside |
good point! yeah I would add the check in fixed_policy instead, as you suggest. @jimmytyyang |
Thanks for the review! Andrew spoke with me saying that he is fine with the current implementation, and it might introduce an overhead if there are no envs to pause. So based on this and what Xavi suggested, I feel that I would like to expose this and I will add a comment there to say why we want to have this condition. Thanks for the awesome review! :) |
* fix the env pause issue * add comment --------- Co-authored-by: Jimmy Yang <jimmytyyang@meta.com>
* fix the env pause issue * add comment --------- Co-authored-by: Jimmy Yang <jimmytyyang@meta.com>
Motivation and Context
This is to fix the issue when doing an evaluation on the HRL policy, the size of internal stateful parameters does not match the number of active skills. The issue has been known in multiple places:(1) our team's slack channel
(2) github issues: #1718
(3) myself
How Has This Been Tested
Loading the social nav checkpoint and run full dataset evaluationTypes of changes
Checklist