pyg-team/pytorch_geometric

Support filesystem abstraction with fsspec or epath.

Open

#8,336 opened on 2023年11月7日

GitHub で見る
 (9 comments) (1 reaction) (1 assignee)Python (19,985 stars) (3,514 forks)batch import
datasetfeaturehelp wanted

説明

🛠 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.

コントリビューターガイド