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

[air] Use custom fsspec handler for GS #24008

Merged
merged 4 commits into from
Apr 20, 2022

Conversation

krfricke
Copy link
Contributor

Why are these changes needed?

gcsfs complains about an invalid create_parents argument when using google cloud storage with cloud checkpoints. Thus we should use an alternative fs spec handler that omits this argument for gs.

The root issue will be fixed here: fsspec/gcsfs#471

Related issue number

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

def create_dir(self, path, recursive):
try:
# No `create_parents` argument
self.fs.mkdir(path)
Copy link
Contributor

Choose a reason for hiding this comment

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

So it doesn't support create folders recursively now? What if the parent folder does not exist?

Copy link
Contributor Author

@krfricke krfricke Apr 19, 2022

Choose a reason for hiding this comment

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

No, the gs fsspec implementation does not accept a create_parents argument, which would be called by FSSpecHandler. As seen in the linked PR for gcsfs, it does not implement the fsspec base class correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GS does not have the notion of parent directories, everything is just an absolute path

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Curious what is the difference between gs and gcs?

Copy link
Contributor Author

@krfricke krfricke Apr 19, 2022

Choose a reason for hiding this comment

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

There's no difference, these are the two registered URI protocols for google storage in fsspec: https://github.com/fsspec/filesystem_spec/blob/master/fsspec/registry.py#L107-L114

Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

quick questions.

python/ray/ml/utils/remote_storage.py Show resolved Hide resolved
python/ray/ml/utils/remote_storage.py Outdated Show resolved Hide resolved
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

cool. looks good as a temporary workaround.

python/ray/ml/utils/remote_storage.py Outdated Show resolved Hide resolved
@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 20, 2022
Copy link
Contributor

@matthewdeng matthewdeng left a comment

Choose a reason for hiding this comment

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

Nice job fixing gcsfs too! ⭐

python/ray/ml/utils/remote_storage.py Outdated Show resolved Hide resolved
@krfricke krfricke removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 20, 2022
@krfricke krfricke merged commit 261a8a7 into ray-project:master Apr 20, 2022
@krfricke krfricke deleted the ml/remote-storage-gs branch April 20, 2022 13:51
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.

None yet

7 participants