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

Implement support for fsspec callbacks in put_file/get_file #275

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

isidentical
Copy link
Member

@isidentical isidentical commented Sep 14, 2021

This patch adds support for fsspec callbacks. It also removes some load from the get_file:

  • There is a completely redundant ls() call it is making on every get_file operation, which is very costful
  • It also tries to do an isdir() check, which is also very costful (if not cached) when considering it is done for every get_file especially on Azure, since there are no directories per se.

Resolves #276

@isidentical
Copy link
Member Author

CC: @TomAugspurger @hayesgb

@hayesgb
Copy link
Collaborator

hayesgb commented Sep 15, 2021

Thanks!

@hayesgb hayesgb merged commit 7dd3672 into fsspec:master Sep 15, 2021
@rubenpraets
Copy link

@isidentical In your change you link to a comment Azure/azure-sdk-for-python#11419 (comment) explaining how to make a callback, but you don't follow it all the way. In particular this comment includes a check to see if current is None, which you omitted in your change. Why is that exactly? I'm asking because this is causing us trouble at the moment, please also see iterative/dvc#7704.

skshetry added a commit to skshetry/adlfs that referenced this pull request Dec 13, 2023
See Azure/azure-sdk-for-python#11419 (comment) on how to get
progress information.
Also related: fsspec#275 (comment) and iterative/dvc#7704.

Invalid values should not be passed to callbacks.
skshetry added a commit to skshetry/adlfs that referenced this pull request Dec 15, 2023
See Azure/azure-sdk-for-python#11419 (comment) on how to get
progress information.
Also related: fsspec#275 (comment) and iterative/dvc#7704.

Invalid values should not be passed to callbacks.
skshetry added a commit to skshetry/adlfs that referenced this pull request Dec 15, 2023
See Azure/azure-sdk-for-python#11419 (comment) on how to get
progress information.
Also related: fsspec#275 (comment) and iterative/dvc#7704.

Invalid values should not be passed to callbacks.
efiop pushed a commit to skshetry/adlfs that referenced this pull request Dec 23, 2023
See Azure/azure-sdk-for-python#11419 (comment) on how to get
progress information.
Also related: fsspec#275 (comment) and iterative/dvc#7704.

Invalid values should not be passed to callbacks.
efiop pushed a commit that referenced this pull request Dec 23, 2023
See Azure/azure-sdk-for-python#11419 (comment) on how to get
progress information.
Also related: #275 (comment) and iterative/dvc#7704.

Invalid values should not be passed to callbacks.
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.

Implement support for fsspec callbacks
3 participants