SIGN IN SIGN UP

Improve `TrainingDatasetMetadata` and `get_shuffle_engine` for incomplete projects (#3313)

* improve error messages for  `TrainingDatasetMetadata`

This commit addresses two issues:
- trainset_index can be out of bounds for TrainingFraction — that's an IndexError but surfaces as a confusing message about fractions.
- The shuffle is not in the metadata — but you have no idea if that's because the metadata is empty, or because the index is simply wrong.

More informative messages let you easier diagnose the problem

* update `get_shuffle_engine`

- Don't save empty TrainingDatasetMetadata if not found
- Fallback: search in model folders for same shuffle index if metadata not found

* Improve logging: surface a warning when shuffle not found in metadata, before falling back to model-folder detection

* fix item retrieval from set of engines

* add tests for TrainsetMetadata
J
Jaap de Ruyter van Steveninck committed
86a475cd28a44a7b596f5b9349b6a74831dd9962
Parent: 1ad8887
Committed by GitHub <noreply@github.com> on 5/15/2026, 12:03:56 PM