Add offline time-window indices for Yambda - #907
JacoCheung wants to merge 1 commit into
Conversation
|
MLCommons CLA bot: |
634bae3 to
06b1848
Compare
|
thanks for creating the PR, could we add a new subsection in the Direction section(seciton 2) in the benchmark README (https://github.com/mlcommons/training/tree/master/recommendation#readme) so people now how to use the use_offline_ts_indices feature? |
6e75f5b to
8058429
Compare
Build stable indices and offsets during cache preparation when enabled. Reuse read-only slices for streaming windows and offsets for sample counts, with serialized construction across ranks.
8058429 to
09612ef
Compare
Could you check section training-data-order which I think reads more smoothly. |
Summary
Yambda streaming training scans the full anchor timestamp array for each time window. This adds opt-in offline indices so window selection uses read-only mmap slices and training sample counts use offset differences when no user holdout is configured.
With
get_dataset.use_offline_ts_indices = Truein the Yambda gin configuration, dataset initialization automatically bucketizes anchors by time window and builds the indices and offsets on the first run, after the corresponding positions cache is ready. Generation uses bounded chunks, preserves ascending anchor order within each window, and reuses the positions-cache lock to avoid duplicate work across ranks. Completed files are reused. The two files are stored alongside their source positions and timestamps incache_dir, with filenames that include history settings and window duration. Separate caches therefore keep separate TS files. The option defaults toFalseand is passed fromget_datasetto the dataset constructor.The benchmark README documents the gin setting, automatic first-run bucketization, cache reuse, and prebuilding files for read-only data mounts under Dataset/Environment → Training data order.
Validation
The workflow smoke checks used a small Parquet fixture with accelerator imports stubbed. Full GPU training was not run.