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

[Tune] Break from loop after warning msg is logged. #18720

Merged
merged 2 commits into from
Sep 18, 2021

Conversation

xwjiang2010
Copy link
Contributor

@xwjiang2010 xwjiang2010 commented Sep 17, 2021

Why are these changes needed?

Break out of the loop when warning is logged, so not to spam the log.
Also change the freq of logging such warning to be 60s.

Tested by both unit test and manually running a Tune script locally.

Output:
https://gist.github.com/xwjiang2010/a02782eef66901b51b52a4c08b6732e7
It's printed once per 60s and only for one trial.

Related issue number

Closes #18718

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

@@ -303,6 +304,7 @@ def _may_warn_insufficient_resources(self, all_trials):
# Raise an Error once #18608 is resolved.
logger.warning(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not warn once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My own experience is we output a lot of PENDING logs (see the linked output in description) and that can easily distract user from the useful output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good point.

@scv119
Copy link
Contributor

scv119 commented Sep 18, 2021

windows tests are not related.

@scv119 scv119 merged commit 5551cda into ray-project:master Sep 18, 2021
@xwjiang2010 xwjiang2010 deleted the fix_spammy branch November 11, 2021 18:55
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.

[Bug] tune prints a lot of verbose warnings for the same issue
4 participants