-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[air/output] Include traceback as part of the warning log for syncing failures #36993
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…better_sync_errors
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…better_sync_errors
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
krfricke
approved these changes
Jul 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit for the max_retries
case
last_error = None | ||
for _ in range(max_retries): | ||
last_error_traceback = None | ||
for i in range(max_retries + 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this makes semantically sense (we try 4 times --> thus 3 retries), but let's set default max_retries
to 2 then
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…better_sync_errors
8 tasks
krfricke
pushed a commit
that referenced
this pull request
Jul 7, 2023
#36993 changed `Syncer.wait` to raise the syncing error rather than wrap in a `TuneError` in all cases except for a `TimeoutError`. This was changed due to the `TuneError` being unnecessary and causing the error logging to be confusing. However, we do catch a `TuneError` specifically in many parts of the code that call `Syncer.wait`, so these cases now hard fail rather than soft failing with a warning log. This PR also fixes experiment syncing up and down to handle syncing errors in a standard way. Here's the current handling of syncing errors to cloud: 1. Driver background syncing to and from cloud: Soft fail on `TimeoutError` --> Soft fail on general exceptions (this is the change from the PR) 2. Trainable checkpoint/artifact syncing: Soft fail on all syncing errors after retrying 2 times. (no change) Signed-off-by: Justin Yu <justinvyu@anyscale.com>
SongGuyang
pushed a commit
to alipay/ant-ray
that referenced
this pull request
Jul 12, 2023
… failures (ray-project#36993) This PR improves observability into errors that occur during syncing by including the traceback which can help track down the underlying cause of the error. When using with wait_or_retry, this only prints the full traceback after all retry attempts have failed. Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: 久龙 <guyang.sgy@antfin.com>
SongGuyang
pushed a commit
to alipay/ant-ray
that referenced
this pull request
Jul 12, 2023
ray-project#36993 changed `Syncer.wait` to raise the syncing error rather than wrap in a `TuneError` in all cases except for a `TimeoutError`. This was changed due to the `TuneError` being unnecessary and causing the error logging to be confusing. However, we do catch a `TuneError` specifically in many parts of the code that call `Syncer.wait`, so these cases now hard fail rather than soft failing with a warning log. This PR also fixes experiment syncing up and down to handle syncing errors in a standard way. Here's the current handling of syncing errors to cloud: 1. Driver background syncing to and from cloud: Soft fail on `TimeoutError` --> Soft fail on general exceptions (this is the change from the PR) 2. Trainable checkpoint/artifact syncing: Soft fail on all syncing errors after retrying 2 times. (no change) Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: 久龙 <guyang.sgy@antfin.com>
harborn
pushed a commit
to harborn/ray
that referenced
this pull request
Aug 17, 2023
… failures (ray-project#36993) This PR improves observability into errors that occur during syncing by including the traceback which can help track down the underlying cause of the error. When using with wait_or_retry, this only prints the full traceback after all retry attempts have failed. Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: harborn <gangsheng.wu@intel.com>
harborn
pushed a commit
to harborn/ray
that referenced
this pull request
Aug 17, 2023
ray-project#36993 changed `Syncer.wait` to raise the syncing error rather than wrap in a `TuneError` in all cases except for a `TimeoutError`. This was changed due to the `TuneError` being unnecessary and causing the error logging to be confusing. However, we do catch a `TuneError` specifically in many parts of the code that call `Syncer.wait`, so these cases now hard fail rather than soft failing with a warning log. This PR also fixes experiment syncing up and down to handle syncing errors in a standard way. Here's the current handling of syncing errors to cloud: 1. Driver background syncing to and from cloud: Soft fail on `TimeoutError` --> Soft fail on general exceptions (this is the change from the PR) 2. Trainable checkpoint/artifact syncing: Soft fail on all syncing errors after retrying 2 times. (no change) Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: harborn <gangsheng.wu@intel.com>
harborn
pushed a commit
to harborn/ray
that referenced
this pull request
Aug 17, 2023
… failures (ray-project#36993) This PR improves observability into errors that occur during syncing by including the traceback which can help track down the underlying cause of the error. When using with wait_or_retry, this only prints the full traceback after all retry attempts have failed. Signed-off-by: Justin Yu <justinvyu@anyscale.com>
harborn
pushed a commit
to harborn/ray
that referenced
this pull request
Aug 17, 2023
ray-project#36993 changed `Syncer.wait` to raise the syncing error rather than wrap in a `TuneError` in all cases except for a `TimeoutError`. This was changed due to the `TuneError` being unnecessary and causing the error logging to be confusing. However, we do catch a `TuneError` specifically in many parts of the code that call `Syncer.wait`, so these cases now hard fail rather than soft failing with a warning log. This PR also fixes experiment syncing up and down to handle syncing errors in a standard way. Here's the current handling of syncing errors to cloud: 1. Driver background syncing to and from cloud: Soft fail on `TimeoutError` --> Soft fail on general exceptions (this is the change from the PR) 2. Trainable checkpoint/artifact syncing: Soft fail on all syncing errors after retrying 2 times. (no change) Signed-off-by: Justin Yu <justinvyu@anyscale.com>
arvind-chandra
pushed a commit
to lmco/ray
that referenced
this pull request
Aug 31, 2023
… failures (ray-project#36993) This PR improves observability into errors that occur during syncing by including the traceback which can help track down the underlying cause of the error. When using with wait_or_retry, this only prints the full traceback after all retry attempts have failed. Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra
pushed a commit
to lmco/ray
that referenced
this pull request
Aug 31, 2023
ray-project#36993 changed `Syncer.wait` to raise the syncing error rather than wrap in a `TuneError` in all cases except for a `TimeoutError`. This was changed due to the `TuneError` being unnecessary and causing the error logging to be confusing. However, we do catch a `TuneError` specifically in many parts of the code that call `Syncer.wait`, so these cases now hard fail rather than soft failing with a warning log. This PR also fixes experiment syncing up and down to handle syncing errors in a standard way. Here's the current handling of syncing errors to cloud: 1. Driver background syncing to and from cloud: Soft fail on `TimeoutError` --> Soft fail on general exceptions (this is the change from the PR) 2. Trainable checkpoint/artifact syncing: Soft fail on all syncing errors after retrying 2 times. (no change) Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why are these changes needed?
This PR improves observability into errors that occur during syncing by including the traceback which can help track down the underlying cause of the error. When using with
wait_or_retry
, this only prints the full traceback after all retry attempts have failed.Example
Before:
After:
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.