Skip to content

fix(v1): honor batch size in train_gen without permutation#391

Open
kuishou68 wants to merge 1 commit intogoogle-research:masterfrom
kuishou68:cocoon/fix-train-gen-batching
Open

fix(v1): honor batch size in train_gen without permutation#391
kuishou68 wants to merge 1 commit intogoogle-research:masterfrom
kuishou68:cocoon/fix-train-gen-batching

Conversation

@kuishou68
Copy link
Copy Markdown

Summary

  • keep train_gen() batches aligned with batch_size when permute=False
  • mirror the deterministic chunking behavior already used by test_val_gen()
  • add a regression test covering the non-permuted batching path

Notes

  • I could not run the Python test suite in this sandbox because the available Python runtime is incomplete, so this patch was validated by code-path review and a focused regression test addition.

Closes #359

darkpowerxo added a commit to darkpowerxo/timesfm that referenced this pull request Apr 8, 2026
Apply changes from PR google-research#391 by @MarcoGorworworelli:
- Fix train_gen() to iterate in proper batch_size chunks instead of
  yielding all time series at once when permute=False
- Add test_data_loader.py to verify batch boundaries

Co-authored-by: MarcoGorelli <marco_gorelli@protonmail.com>
darkpowerxo added a commit to darkpowerxo/timesfm that referenced this pull request Apr 8, 2026
Apply changes from PR google-research#391 by @MarcoGorworworelli:
- Fix train_gen() to iterate in proper batch_size chunks instead of
  yielding all time series at once when permute=False
- Add test_data_loader.py to verify batch boundaries
darkpowerxo added a commit to darkpowerxo/timesfm that referenced this pull request Apr 8, 2026
Apply changes from PR google-research#391 by @MarcoGorworworelli:
- Fix train_gen() to iterate in proper batch_size chunks instead of
  yielding all time series at once when permute=False
- Add test_data_loader.py to verify batch boundaries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

train_gen loads indices of all time series instead of batch-size if self.permute is False

1 participant