Skip to content

Conversation

@KOKOSde
Copy link

@KOKOSde KOKOSde commented Jan 31, 2026

Summary

Fix globbing local symlinked parquet files when fsspec reports symlinks as type='other' (common in HF cache layouts with blob storage).

Some fsspec versions report local symlinks as type='other' and may omit the islink flag. This caused symlinked files to be excluded from pattern matching when using load_dataset with local file patterns.

Changes

  • Explicitly check os.path.islink() for local file protocol in resolve_pattern()
  • Add regression test that forces the type='other' scenario

Test plan

  • Added test_resolve_pattern_locally_glob_includes_symlinked_files to verify symlinks are included
  • All existing tests in test_data_files.py pass (223 tests)

Fixes #7084

Some fsspec versions report local symlinks as type='other' and may omit
the 'islink' flag. This caused symlinked parquet files (common in HF cache
layouts with blob storage) to be excluded from pattern matching.

Changes:
- Explicitly check os.path.islink() for local file protocol
- Add regression test that forces the type='other' scenario

Fixes huggingface#7084

Co-authored-by: Cursor <[email protected]>
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.

More easily support streaming local files

1 participant