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] Improve test learning check, fix flaky two step qmix #16843

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Jul 2, 2021

Why are these changes needed?

two step qmix was previously very flaky.

The core test has been fixed by providing a seed. For this to work, passing the seed in a GroupAgentWrapper had to be enabled.

Secondly, learning test checks recently used analysis.trials[0].last_result to check for success. This PR introduces a change, that collects all trials results and picks the best achieved reward. This means that the test will always succeed if at least one of the trials achieved the desired performance.

  • This won't make a difference for single trial runs.
  • This is usually good for parameter sweeps, as we expect at least one trial to achieve good performance, not all
  • This might not be suitable for some tests that require that all trials achieve good performance. However, since the test was previously just about testing that the first trial achieved good performance, this doesn't seem like a regression to me.

cc @ericl, @sven1977 and @richardliaw for your opinion on this change.

Related issue number

Checks

  • 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 :(

@richardliaw
Copy link
Contributor

This change looks fine to me.

@krfricke
Copy link
Contributor Author

krfricke commented Jul 6, 2021

I'll merge because I don't see how this should lead to any regressions. We can revert if someone has concerns.

@krfricke krfricke merged commit 10fd711 into ray-project:master Jul 6, 2021
@krfricke krfricke deleted the rllib-flaky branch July 6, 2021 18:39
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.

None yet

3 participants