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

Fix an off-by-one error in LocalSampler #1156

Merged
merged 1 commit into from
Jan 27, 2020
Merged

Conversation

krzentner
Copy link
Contributor

Before, LocalSampler always gathered at least one more sample than
requested. This generally isn't a problem, but made sampling slightly
less predictable with LocalSampler.

@krzentner krzentner requested a review from a team as a code owner January 26, 2020 16:26
@codecov
Copy link

codecov bot commented Jan 26, 2020

Codecov Report

Merging #1156 into master will increase coverage by 4.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1156      +/-   ##
==========================================
+ Coverage   83.51%   87.64%   +4.13%     
==========================================
  Files         182      182              
  Lines        8639     8639              
  Branches     1102     1102              
==========================================
+ Hits         7215     7572     +357     
+ Misses       1221      866     -355     
+ Partials      203      201       -2
Impacted Files Coverage Δ
src/garage/sampler/local_sampler.py 100% <100%> (ø) ⬆️
src/garage/sampler/stateful_pool.py 61.65% <0%> (ø) ⬆️
...rc/garage/sampler/off_policy_vectorized_sampler.py 97.75% <0%> (+1.12%) ⬆️
src/garage/tf/algos/npo.py 95.29% <0%> (+1.56%) ⬆️
src/garage/tf/misc/tensor_utils.py 76.11% <0%> (+2.98%) ⬆️
.../exploration_strategies/epsilon_greedy_strategy.py 100% <0%> (+3.7%) ⬆️
src/garage/tf/policies/categorical_cnn_policy.py 100% <0%> (+4.25%) ⬆️
src/garage/tf/baselines/continuous_mlp_baseline.py 100% <0%> (+4.54%) ⬆️
src/garage/tf/algos/vpg.py 81.81% <0%> (+9.09%) ⬆️
src/garage/tf/q_functions/base.py 100% <0%> (+13.33%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36634b9...b04621c. Read the comment docs.

@krzentner
Copy link
Contributor Author

@Mergifyio rebase

Before, LocalSampler always gathered at least one more sample than
requested. This generally isn't a problem, but made sampling slightly
less predictable with LocalSampler.
@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2020

Command rebase: success

Branch has been successfully rebased

Hey, I reacted but my real name is @Mergifyio

@ryanjulian
Copy link
Member

this won't merge automatically without another approving review (also it needs to pass the CI)

@krzentner krzentner merged commit a44daab into master Jan 27, 2020
@krzentner krzentner deleted the fix_sampler_extra_sample branch January 27, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants