Skip to content

feat: configure ML retraining interval in apps.yaml - #5433

Merged
springfall2008 merged 1 commit into
springfall2008:mainfrom
WhatIsThisAllAboutSilly:feature/configurable-ml-retrain-yaml
Oct 12, 2026
Merged

springfall2008 merged 1 commit into
springfall2008:mainfrom
WhatIsThisAllAboutSilly:feature/configurable-ml-retrain-yaml

Conversation

@WhatIsThisAllAboutSilly

Copy link
Copy Markdown
Contributor

Keep the two-hour default and support daily retraining with a 1-48 hour range. Preserve startup training and prediction cadence.

Refs #5072.

Config in YAML rather than a HAOS entity parameter.

Been running this code for a few days, seems fine.

Changes done by AI.

Keep the two-hour default and support daily retraining with a 1-48 hour range.
Preserve startup training and prediction cadence.

Refs springfall2008#5072.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The configuration is correctly wired, bounded, documented, and covered by focused tests.

0 open findings

What changed in this PR

Adds an apps.yaml option for configuring ML retraining from 1–48 hours while retaining the two-hour default.

Changes:

  • Wires the interval through configuration and ML scheduling.
  • Adds validation and cadence tests.
  • Documents daily retraining and unchanged prediction behavior.
File Description
apps/​predbat/​config.py Validates the new setting.
apps/​predbat/​components.py Passes configuration to the ML component.
apps/​predbat/​load_ml_component.py Applies the configured retraining interval.
apps/​predbat/​tests/​test_load_ml.py Tests scheduling, defaults, and bounds.
apps/​predbat/​tests/​test_validate_config.py Tests schema validation.
docs/​load-ml.md Documents detailed usage.
docs/​components.md Updates the component reference.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@springfall2008
springfall2008 merged commit 4e169b1 into springfall2008:main Oct 12, 2026
2 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.

3 participants