Skip to content

Fix building configs reloaded from YAML with date-range splits - #8

Merged
leifdenby merged 1 commit into
dev/dmi-convgru-trainingfrom
fix/yaml-list-splits
Oct 18, 2026
Merged

leifdenby merged 1 commit into
dev/dmi-convgru-trainingfrom
fix/yaml-list-splits

Conversation

@leifdenby

Copy link
Copy Markdown

Second failure when resuming intrigued-sow-455 with --config mlflow:<run> on 27sj894 (after #7 fixed the 404):

ValueError: splits['time'] must use a single supported mode: all defined split values must be either float-like fractions or tuple ranges.
... splits={'time': {'test': ['2025-01-01', '2025-12-31'], ...}}

Cause: YAML has no tuple type. The DMI config's (start, end) splits are written to config.yaml and come back as lists, which validate_splits rejects. So any saved config with date-range splits could not be rebuilt, via --config config.yaml or --config mlflow:<run>. (tests/config/test_dmi.py already noted this and only rebuilt the callbacks.)

Fix: normalize_splits turns two-element lists back into tuples; SourceDataDataModule applies it before validate_splits.

Testing

  • Built the full Experiment from intrigued-sow-455's downloaded config.yaml plus resume_training: splits are tuples, the MLflow logger targets the run, all callbacks build.
  • New: normalize_splits unit test; the DMI config now builds completely after a YAML round trip. Full suite: 172 passed, 5 skipped.

🤖 Generated with Claude Code

…lits

YAML has no tuple type, so the DMI config's tuple-range splits came back
from config.yaml as lists and validate_splits rejected them. That broke
--config config.yaml and --config mlflow:<run> for any config with
date-range splits. SourceDataDataModule now normalises two-element lists
to tuples before validating. The DMI round-trip test now builds the whole
reloaded config instead of working around this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leifdenby
leifdenby requested a review from arjj8 October 18, 2026 19:43
@leifdenby
leifdenby merged commit 60b8101 into dev/dmi-convgru-training Oct 18, 2026
5 checks passed
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.

1 participant