- StreamStore/RecordStore → Streamable/Recordable (stateless mixins) - Store is sole base class, no MRO ambiguity - H5Store/MmapStore/JsonlStore mix in both traits explicitly - segments_are_records declared per-subclass (H5/Jsonl=True, bin=False) - Add tests for dpo_tokenize, lazy jsonl, dual-mode H5, stream-only bin - Remove unused _to_tensor helper
44 lines
736 B
Python
44 lines
736 B
Python
from astrai.dataset.dataset import (
|
|
BaseDataset,
|
|
DatasetFactory,
|
|
dpo_collate_fn,
|
|
grpo_collate_fn,
|
|
)
|
|
from astrai.dataset.sampler import RDSampler
|
|
from astrai.dataset.storage import (
|
|
H5Store,
|
|
JsonlStore,
|
|
MmapStore,
|
|
Recordable,
|
|
Store,
|
|
StoreFactory,
|
|
Streamable,
|
|
detect_format,
|
|
)
|
|
from astrai.serialization import (
|
|
load_bin,
|
|
load_h5,
|
|
save_bin,
|
|
save_h5,
|
|
)
|
|
|
|
__all__ = [
|
|
"BaseDataset",
|
|
"DatasetFactory",
|
|
"dpo_collate_fn",
|
|
"grpo_collate_fn",
|
|
"Store",
|
|
"Streamable",
|
|
"Recordable",
|
|
"StoreFactory",
|
|
"H5Store",
|
|
"MmapStore",
|
|
"JsonlStore",
|
|
"detect_format",
|
|
"save_h5",
|
|
"load_h5",
|
|
"save_bin",
|
|
"load_bin",
|
|
"RDSampler",
|
|
]
|