pytorch / data

A PyTorch repo for data loading and utilities to be shared by the PyTorch domain libraries.
BSD 3-Clause "New" or "Revised" License
1.12k stars 150 forks source link

`IoPathFileLoader` should default mode to the same value as `FileLoader` #90

Closed fmassa closed 2 years ago

fmassa commented 2 years ago

🚀 Feature

Self-explanatory. I believe the modes should be the same for ease of exchangeability. PyTorch FileLoader uses b by default, while IoPathFileLoader uses r https://github.com/pytorch/data/blob/4802a350d1bf954d0785e0f22fd1fcde2deded76/torchdata/datapipes/iter/load/iopath.py#L56

ejguan commented 2 years ago

SGTM

ejguan commented 2 years ago

@NivekT Has this issue been solved in one of your PRs? Can we close it?

NivekT commented 2 years ago

Yep, fixed by https://github.com/pytorch/pytorch/pull/70367.