Skip to content

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.

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.

@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! ⭐

@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.

7 participants