libffcv / ffcv

FFCV: Fast Forward Computer Vision (and other ML workloads!)
https://ffcv.io
Apache License 2.0
2.79k stars 180 forks source link

Access datapoints through indexing from `.beton` file without creating a DataLoader #289

Closed Vishu26 closed 1 month ago

Vishu26 commented 1 year ago

Is it possible to access some datapoints from the .beton file without having to load them into a DataLoader?

andrewilyas commented 1 year ago

The easiest way I can think to do this now would be to make a loader and pass indices=[i] where i is the index you want to access, and then access the first batch from that loader. Does that work for your use case?