pyg-team/pytorch_geometric

Support filesystem abstraction with fsspec or epath.

Open

#8 336 ouverte le 7 nov. 2023

Voir sur GitHub
 (9 commentaires) (1 réaction) (1 assigné)Python (3 514 forks)batch import
datasetfeaturehelp wanted

Métriques du dépôt

Stars
 (19 985 stars)
Métriques de merge PR
 (Merge moyen 16j 3h) (13 PRs mergées en 30 j)

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.

Guide contributeur