-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Including last step in OPE #12619
Including last step in OPE #12619
Conversation
@sven1977 can you take a look? |
rllib/offline/is_estimator.py
Outdated
|
||
# calculate stepwise IS estimate | ||
V_prev, V_step_IS = 0.0, 0.0 | ||
for t in range(batch.count - 1): |
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.
Shouldn't this also be changed to batch.count
rather than batch.count-1
?
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.
Yes, it should be changed. Thank you @matthewhall210
rllib/offline/wis_estimator.py
Outdated
|
||
# calculate stepwise weighted IS estimate | ||
V_prev, V_step_WIS = 0.0, 0.0 | ||
for t in range(batch.count - 1): |
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.
Shouldn't this also be changed to batch.count
rather than batch.count-1
?
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.
Yes, it should be changed. Thank you @matthewhall210
thanks a bunch for opening this PR :) |
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 fix @felipeeeantunes !
Why are these changes needed?
The problem was cited in this discussion topic and also discussed with Sven in a private Slack channel:
Sven response was:
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.