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

[Datasets] Remove FastFileMetadataProvider warning #24909

Conversation

bveeramani
Copy link
Member

@bveeramani bveeramani commented May 18, 2022

Why are these changes needed?

If you use a datasource that uses FastFileMetadataProvider (e.g., ImageFolderDatasource), a warning is raised:

(_prepare_read pid=43380) 2022-05-11 02:11:33,272 WARNING file_meta_provider.py:199 -- Skipping expansion of 2 path(s). If your paths contain directories or if file size collection is required, try rerunning this read with meta_provider=DefaultFileMetadataProvider().

This may confuse users because:

  • It has nothing to do with the user's problem
  • It leaks an implementation detail
  • It can't be resolved (there's no issue in the first place)

Related issue number

See #24641

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

@@ -196,11 +196,6 @@ def expand_paths(
paths: List[str],
filesystem: "pyarrow.fs.FileSystem",
) -> Tuple[List[str], List[Optional[int]]]:
logger.warning(
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I think I commented this before that it should probably not log unconditionally.

@ericl
Copy link
Contributor

ericl commented May 19, 2022

Why not have ImageFolderDatasource use the default metadata provider instead? The warning is here for a reason: not resolving sub directories is very dangerous behavior.

@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 May 19, 2022
@bveeramani
Copy link
Member Author

Why not have ImageFolderDatasource use the default metadata provider instead? The warning is here for a reason: not resolving sub directories is very dangerous behavior.

The current implementation of ImageFolderDatasource is too slow with the default metadata provider.

@bveeramani
Copy link
Member Author

Once #24822 gets merged, I'll use the default metadata provider to implement ImageFolderDatasource.

That being said, I agree with @jianoaix that we probably shouldn't unconditionally log this warning. I don't know if it makes sense to log a warning when FastFileMetadataProvider is being used correctly.

@bveeramani bveeramani closed this May 23, 2022
@bveeramani bveeramani deleted the remove-fast-file-meta-warning branch May 23, 2022 04:30
@bveeramani bveeramani removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label May 23, 2022
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.

5 participants