-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error propagation for as_directory if to_directory fails (#40025)
`Checkpoint.as_directory` currently downloads the checkpoint to the local filesystem if the checkpoint is remote. It uses `to_directory` to do so. If this fails, `as_directory` will raise a strange error during its `finally` clause that is unrelated to the actual error that occurred during downloading. This PR fixes the issue by only wrapping the user's code in the `try` block. This way, any exceptions during downloading get raised immediately. Signed-off-by: Justin Yu <justinvyu@anyscale.com>
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
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
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