Skip to content

feat(interface): generic RunConfig base + opaque config mapping (M02) - #5

Merged
sandrohuni merged 2 commits into
mainfrom
feat/fi-runconfig-base
Aug 5, 2026
Merged

feat(interface): generic RunConfig base + opaque config mapping (M02)#5
sandrohuni merged 2 commits into
mainfrom
feat/fi-runconfig-base

Conversation

@sandrohuni

Copy link
Copy Markdown
Collaborator

What

Adds a thin, generic RunConfig Pydantic base to FI — the only run-config fields universal to any probabilistic forecast model, all optional:

  • quantile_levels: list[float] | None — validated to (0, 1) (reuses the existing variable_output.py rule)
  • num_trajectories: int | NoneField(gt=0)
  • num_samples: int | NoneField(gt=0)

Everything model-specific stays opaque: train/retrain retype config: Anyconfig: Mapping[str, Any], documented as a mapping each model self-validates. No aquacast-specific class in FI. Closes design question Q8.

Milestone

FI-integration milestone 02 (docs/FI_integration/milestones.md in aquacast). This is the FI-side half; aquacast consumes the base later (M09).

Verification

  • uv run pytest -q -k run_config → 6 passed
  • uv run pytest -q (full suite) → 183 passed
  • uv run ruff check → clean
  • from forecast_interface import RunConfig resolves (both top-level and interface paths)

Scope

Base + validation + export + one unit test + the authorized config retype only. No trainer/finetune/model-private fields, no merge/assembly logic, no aquacast consumption.

🤖 Generated with Claude Code

sandrohuni and others added 2 commits July 23, 2026 12:38
Thin cross-model run-config base with the only fields universal to any
probabilistic forecast model — quantile_levels, num_trajectories,
num_samples — all optional, with field validation (levels in (0,1),
positive counts). Retype train/retrain `config: Any` -> `Mapping[str, Any]`
and document that `config` is otherwise opaque, each model self-validating.
No model-specific fields in FI. Closes Q8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s retention count

Co-designed with aquacast milestone 17 (full predictive distribution).

- num_weight_samples (epistemic weight draws, gt=0 when set): together with
  num_samples (aleatoric draws per weight) the pooled num_weight_samples ×
  num_samples draws are the full predictive distribution.
- num_trajectories redefined to a RETENTION count of raw temporally-coherent
  paths to emit as TrajectoryData (0 = none), no longer a generation count —
  relaxed gt=0 -> ge=0 to allow explicit "emit none".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sandrohuni
sandrohuni merged commit c5c7fcd into main Aug 5, 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.

1 participant