Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Deflake test_reserved_cpu_warnings (again) (#31535)
Attempt 2 at deflaking test_reserved_cpu_warnings. This time, we mock ray.available_resources() (used in the warning logic) to always return cluster resources (aka the expected state). This removes the stochastic nature of ray.available_resources() as we may have leftover tasks/actors that have not been cleaned up in time for the next fit call. The previous attempt used gc.collect but it didn't solve the problem entirely. This is a blanket mock of ray.available_resources. At this moment, this function is only used in Tune for the warning logic. A safer approach would be to mock it just in the TunerInternal._maybe_warn_resource_contention method, but that would introduce a lot more patching code here. Signed-off-by: Antoni Baum <[email protected]>
- Loading branch information