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

[Train/CI] Fix flaky test_reserved_cpu_warnings #31415

Merged

Conversation

Yard1
Copy link
Member

@Yard1 Yard1 commented Jan 3, 2023

Signed-off-by: Antoni Baum antoni.baum@protonmail.com

Why are these changes needed?

The issue seems to have been caused by Ray tasks / actors being sometimes kept alive between fit calls before garbage collection kicks in to kill them. This caused the ray.available_resources() call in TunerInternal._maybe_warn_resource_contention to return less CPUs available than expected by the test. This has been fixed by explicitly calling gc.collect() between fit calls.

Related issue number

Closes #31334

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

Sorry, something went wrong.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
@amogkam amogkam merged commit 23ad58c into ray-project:master Jan 4, 2023
@Yard1 Yard1 deleted the fix_flaky_test_reserved_cpus_warnings branch January 4, 2023 18:29
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
The issue seems to have been caused by Ray tasks / actors being sometimes kept alive between fit calls before garbage collection kicks in to kill them. This caused the ray.available_resources() call in TunerInternal._maybe_warn_resource_contention to return less CPUs available than expected by the test. This has been fixed by explicitly calling gc.collect() between fit calls.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
The issue seems to have been caused by Ray tasks / actors being sometimes kept alive between fit calls before garbage collection kicks in to kill them. This caused the ray.available_resources() call in TunerInternal._maybe_warn_resource_contention to return less CPUs available than expected by the test. This has been fixed by explicitly calling gc.collect() between fit calls.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
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.

[CI] linux://python/ray/train:test_base_trainer is failing/flaky on master.
3 participants