pyg-team/pytorch_geometric
View on GitHubSupport filesystem abstraction with fsspec or epath.
Open
#8,336 opened on Nov 7, 2023
datasetfeaturehelp wanted
Repository metrics
- Stars
- (19,985 stars)
- PR merge metrics
- (Avg merge 35d 1h) (14 merged PRs in 30d)
Description
🛠 Proposed Refactor
I propose that we replace usage of core python I/O e.g., open, exists, is_file, makedirs, with equivalent filesystem abstraction that allows dispatch to appropriate filesystem backends. This would allow users of your library to easily work with remote filesystems as they work with local filesystems.
E.g.,
from torch_geometric.datasets import Planetoid
from torch_geometric.transforms import NormalizeFeatures
dataset = Planetoid(root='gs://data/Planetoid', name='Cora', transform=NormalizeFeatures())
Suggest a potential alternative/fix
Either of two popular libraries can be used, fsspec or epath could be used to replace the existing calls to built-in functions that assume local filesystem.
I am happy to make a PR for this if I know the preference of filesystem abstraction library and any other concerns.