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

[RLlib] Fix default view_requirement in policy.py #27255

Merged
merged 11 commits into from
Aug 2, 2022

Conversation

kouroshHakha
Copy link
Contributor

Why are these changes needed?

the default view_requirement in policy.py used to enable used_for_compute_actions for new_obs key; for inference we should not look into the future.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. should we mark INFOS column not_for_compute_action as well?
last time I had trouble with this, I made some custom changes in RandomPolicy:
https://github.com/ray-project/ray/blob/master/rllib/examples/policy/random_policy.py#L36-L40
if we flip the default values here, then we can get rid of the custom fix.
I don't think info dict will ever be able to get batched and used for forward pass directly?

@kouroshHakha
Copy link
Contributor Author

looks good. should we mark INFOS column not_for_compute_action as well? last time I had trouble with this, I made some custom changes in RandomPolicy: https://github.com/ray-project/ray/blob/master/rllib/examples/policy/random_policy.py#L36-L40 if we flip the default values here, then we can get rid of the custom fix. I don't think info dict will ever be able to get batched and used for forward pass directly?

None of the other default values should hit this particular issue, since they are not forward looking views?

@gjoliver
Copy link
Member

looks good. should we mark INFOS column not_for_compute_action as well? last time I had trouble with this, I made some custom changes in RandomPolicy: https://github.com/ray-project/ray/blob/master/rllib/examples/policy/random_policy.py#L36-L40 if we flip the default values here, then we can get rid of the custom fix. I don't think info dict will ever be able to get batched and used for forward pass directly?

None of the other default values should hit this particular issue, since they are not forward looking views?

right, they should not hit the particular issue.
it's just the dict values that should supposedly break our batch building logic.

@richardliaw richardliaw merged commit 8d84889 into ray-project:master Aug 2, 2022
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
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

Successfully merging this pull request may close these issues.

3 participants