google / dopamine

Dopamine is a research framework for fast prototyping of reinforcement learning algorithms.
https://github.com/google/dopamine
Apache License 2.0
10.42k stars 1.36k forks source link

Fix flaky test #185

Open crawlingcub opened 2 years ago

crawlingcub commented 2 years ago

The test testSamplePairWithUnevenProbabilities always fails if the seed setting line is removed. A better way to test might be to check if the sampled value exists in the set of values that were put in the tree. This eliminates the dependence on seeds -- which may cause problems later.

Please let me know if this looks reasonable. I will be happy to incorporate any other suggestions that you may have. Thanks!

google-cla[bot] commented 2 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

crawlingcub commented 2 years ago

@googlebot I signed it!

crawlingcub commented 2 years ago

Hi, I fetched and updated the branch. Can you merge into master?

psc-g commented 2 years ago

hi, apologies for not getting back to you earlier.

at this point we're not taking external contributions (mostly for technical reasons). however, we're looking into changing this policy.

regarding setting the seed, i think your suggestion seems reasonable. if you don't mind, let's keep this issue open and we can come back to it once we've figured out the new policy for accepting external contributions.

thanks!