[WB-7432] reduce pyagent heartbeat rate #2923
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://wandb.atlassian.net/browse/WB-7432
Description
wandb.agent()
currently heartbeats 50-100 times per second, when only 1 heartbeat per 5 seconds is needed. This is because the heartbeat is in the path of awhile/continue
loop with no sleep. This PR adds a 5 second sleep to this path to ensure that heartbeats are emitted no more than once per 5 seconds in this pathTesting
How was this PR tested?
Manually
Release Notes
Below, please enter user-facing release notes as one or more bullet points.
If your change is not user-visible, write
NO RELEASE NOTES
instead, with no bullet points.------------- BEGIN RELEASE NOTES ------------------
Fixes an issue where
wandb.agent()
sent too many heartbeats to the server, sometimes leading to rate limits------------- END RELEASE NOTES --------------------