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

Fix fsspec tests in ci #1635

Merged
merged 5 commits into from
Sep 4, 2023
Merged

Fix fsspec tests in ci #1635

merged 5 commits into from
Sep 4, 2023

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 4, 2023

fsspec.exists logic catches ALL exceptions which can lead to unexpected behaviors. For example, we raise a NotImplementedError when trying to list repositories (which is not supported). This PR adapts the logic to raise on any exception except the NotImplementedError.

First discovered about it since fsspec.glob() logic has been changed in fsspec/filesystem_spec#1329 (released in 2023.9.0). It now relies on .exists() instead of .find() which catch all exceptions, including the NotImplementedError (making the CI fail)

cc @mariosasko please let me know if you think such a change will lead to unexpected behavior as it's a quite low-level method. I happy to revisit this PR if you have a better idea. I found catching all exceptions quite unnatural in general but maybe I'm wrong.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 4, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks !

@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 4, 2023

Thanks for the quick review @lhoestq :)

@Wauplin Wauplin merged commit 882be57 into main Sep 4, 2023
15 of 16 checks passed
@Wauplin Wauplin deleted the fix-fsspec-tests-in-ci branch September 4, 2023 14:13
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.

3 participants