Repository navigation
[data] Fix CheckpointConfig FileNotFoundError on Azure Blob Storage - #63606
Merged
richardliaw merged 3 commits intoMay 28, 2026
Merged
richardliaw merged 3 commits into
richardliaw merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the _clean_pending_checkpoints_task function in checkpoint_filter.py to include allow_not_found=True in the FileSelector call. This change prevents potential errors when the checkpoint directory does not exist during the cleaning process. I have no feedback to provide as there were no review comments.
Add allow_not_found=True to FileSelector in _clean_pending_checkpoints_task to handle non-existent checkpoint directories on Azure Blob Storage. Update test_clean_pending_checkpoints_task_failure to match the new behavior: a non-existent checkpoint directory now returns an empty list instead of raising, so cleanup succeeds gracefully. Signed-off-by: Michael Pryor <[email protected]>
michael-pryor
force-pushed
the
fix-checkpoint-azure-filenotfound
branch
from
May 22, 2026 23:52
d87510e to
c1b6bce
Compare
Signed-off-by: Michael Pryor <[email protected]> Co-authored-by: Cursor <[email protected]>
Signed-off-by: Michael Pryor <[email protected]>
Contributor
|
@owenowenisme can you help review? |
michael-pryor
marked this pull request as ready for review
May 27, 2026 08:17
rueian
pushed a commit
to rueian/ray
that referenced
this pull request
Jun 4, 2026
…ay-project#63606) ## Why are these changes needed? `_clean_pending_checkpoints_task` in `checkpoint_filter.py` uses `FileSelector` without `allow_not_found=True` when listing checkpoint files: ```python ckpt_files = checkpoint_filesystem.get_file_info( FileSelector(checkpoint_path_unwrapped, recursive=False) ) ``` On S3, listing a non-existent prefix returns an empty result. On Azure Blob Storage, it raises `FileNotFoundError`. This breaks `CheckpointConfig` on Azure for first-run scenarios where the checkpoint directory does not yet exist. The data file listing in the same function already correctly uses `allow_not_found=True`: ```python data_files = data_file_filesystem.get_file_info( FileSelector(data_file_dir_unwrapped, recursive=True, allow_not_found=True) ) ``` Similarly, the `load_checkpoint` method in `CheckpointManager` also uses `allow_not_found=True` for its own `FileSelector` call. This was introduced in ray-project#61821 which was only tested on S3. ## Fix Add `allow_not_found=True` to the `FileSelector` call in `_clean_pending_checkpoints_task`. ## Related issue number N/A ## Checks - [x] I've signed the [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSfAMq5v7-hRKRvNaRDhx_WP1W0IKTm7lBvpBlOrLAsNP2MKIQ/viewform). - [ ] 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 added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` (if applicable). - [ ] 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/ *This PR was authored with Cursor assistance.* Made with [Cursor](https://cursor.com) --------- Signed-off-by: Michael Pryor <[email protected]> Co-authored-by: Cursor <[email protected]>
limarkdcunha
pushed a commit
to limarkdcunha/ray
that referenced
this pull request
Jun 30, 2026
…ay-project#63606) ## Why are these changes needed? `_clean_pending_checkpoints_task` in `checkpoint_filter.py` uses `FileSelector` without `allow_not_found=True` when listing checkpoint files: ```python ckpt_files = checkpoint_filesystem.get_file_info( FileSelector(checkpoint_path_unwrapped, recursive=False) ) ``` On S3, listing a non-existent prefix returns an empty result. On Azure Blob Storage, it raises `FileNotFoundError`. This breaks `CheckpointConfig` on Azure for first-run scenarios where the checkpoint directory does not yet exist. The data file listing in the same function already correctly uses `allow_not_found=True`: ```python data_files = data_file_filesystem.get_file_info( FileSelector(data_file_dir_unwrapped, recursive=True, allow_not_found=True) ) ``` Similarly, the `load_checkpoint` method in `CheckpointManager` also uses `allow_not_found=True` for its own `FileSelector` call. This was introduced in ray-project#61821 which was only tested on S3. ## Fix Add `allow_not_found=True` to the `FileSelector` call in `_clean_pending_checkpoints_task`. ## Related issue number N/A ## Checks - [x] I've signed the [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSfAMq5v7-hRKRvNaRDhx_WP1W0IKTm7lBvpBlOrLAsNP2MKIQ/viewform). - [ ] 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 added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` (if applicable). - [ ] 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/ *This PR was authored with Cursor assistance.* Made with [Cursor](https://cursor.com) --------- Signed-off-by: Michael Pryor <[email protected]> Co-authored-by: Cursor <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…ay-project#63606) ## Why are these changes needed? `_clean_pending_checkpoints_task` in `checkpoint_filter.py` uses `FileSelector` without `allow_not_found=True` when listing checkpoint files: ```python ckpt_files = checkpoint_filesystem.get_file_info( FileSelector(checkpoint_path_unwrapped, recursive=False) ) ``` On S3, listing a non-existent prefix returns an empty result. On Azure Blob Storage, it raises `FileNotFoundError`. This breaks `CheckpointConfig` on Azure for first-run scenarios where the checkpoint directory does not yet exist. The data file listing in the same function already correctly uses `allow_not_found=True`: ```python data_files = data_file_filesystem.get_file_info( FileSelector(data_file_dir_unwrapped, recursive=True, allow_not_found=True) ) ``` Similarly, the `load_checkpoint` method in `CheckpointManager` also uses `allow_not_found=True` for its own `FileSelector` call. This was introduced in ray-project#61821 which was only tested on S3. ## Fix Add `allow_not_found=True` to the `FileSelector` call in `_clean_pending_checkpoints_task`. ## Related issue number N/A ## Checks - [x] I've signed the [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSfAMq5v7-hRKRvNaRDhx_WP1W0IKTm7lBvpBlOrLAsNP2MKIQ/viewform). - [ ] 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 added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` (if applicable). - [ ] 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/ *This PR was authored with Cursor assistance.* Made with [Cursor](https://cursor.com) --------- Signed-off-by: Michael Pryor <[email protected]> Co-authored-by: Cursor <[email protected]> Signed-off-by: 400Ping <[email protected]>
This file contains hidden or 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
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?
_clean_pending_checkpoints_taskincheckpoint_filter.pyusesFileSelectorwithoutallow_not_found=Truewhen listing checkpoint files:On S3, listing a non-existent prefix returns an empty result. On Azure Blob Storage, it raises
FileNotFoundError. This breaksCheckpointConfigon Azure for first-run scenarios where the checkpoint directory does not yet exist.The data file listing in the same function already correctly uses
allow_not_found=True:Similarly, the
load_checkpointmethod inCheckpointManageralso usesallow_not_found=Truefor its ownFileSelectorcall.This was introduced in #61821 which was only tested on S3.
Fix
Add
allow_not_found=Trueto theFileSelectorcall in_clean_pending_checkpoints_task.Related issue number
N/A
Checks
scripts/format.shto lint the changes in this PR.doc/source/tune/api/(if applicable).This PR was authored with Cursor assistance.
Made with Cursor