-
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] Use custom fsspec handler for GS #24008
Conversation
def create_dir(self, path, recursive): | ||
try: | ||
# No `create_parents` argument | ||
self.fs.mkdir(path) |
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 it doesn't support create folders recursively now? What if the parent folder does not exist?
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.
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.
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.
GS does not have the notion of parent directories, everything is just an absolute path
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.
I see. Curious what is the difference between gs and gcs?
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.
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
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.
quick questions.
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.
cool. looks good as a temporary workaround.
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.
Nice job fixing gcsfs
too! ⭐
Why are these changes needed?
gcsfs
complains about an invalidcreate_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
scripts/format.sh
to lint the changes in this PR.