aistore.pytorch.shard_reader
aistore.pytorch.shard_reader
AIS Shard Reader for PyTorch
PyTorch Dataset and DataLoader for AIS.
Module Contents
Classes
API
Bases: AISBaseIterDataset
An iterable-style dataset that iterates over objects stored as Webdataset shards and yields samples represented as a tuple of basename (str) and contents (dictionary).
Parameters:
Dict[ Bucket , Union[str, List[str]]] — Prefixes to select from each bucket.
Optional ETL on the AIS cluster to apply to each object
Enables console shard reading progress indicator
When True, distributes buckets across DataLoader workers so each worker only lists its share, avoiding duplicate paged listing calls. Most effective when bucket_list has at least as many buckets as workers. Defaults to False.
Return the number of samples in the dataset.
NOTE:
- This lists and reads every shard without buffering its full payload.
- Count samples during iteration to avoid a second read.
If ETL is enabled, this method counts samples before transformation. The count matches iteration only if ETL preserves the sample count in each shard.
Count sample basenames without seeking or reading the full payload at once.
Yield regular members with an extension, their basename, and extension.