feat: composable Metric/Aggregation primitives for KPI#119
Merged
rororowyourboat merged 2 commits intodevfrom Mar 5, 2026
Merged
feat: composable Metric/Aggregation primitives for KPI#119rororowyourboat merged 2 commits intodevfrom
rororowyourboat merged 2 commits intodevfrom
Conversation
Introduce composable Metric (per-run scalar) and Aggregation (across-run reducer) types that compose into KPIs, aligning with the simulation glossary hierarchy. KPI now accepts either legacy fn or metric+aggregation pair. Built-in metrics: final_value, trajectory_mean, max_value, min_value Built-in aggregations: mean, std, percentile, probability_above/below Evaluator populates per-run distributions for metric-based KPIs. Closes #118
Overview, getting started guide, concept hierarchy (Metric/Aggregation/KPI), parameter spaces reference, optimizer guide, and API reference pages. Adds psuu section to mkdocs nav and landing page package table.
db04790 to
faa8e62
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Metric(per-run scalar extractor) andAggregation(cross-run reducer) as composable building blocks for KPIs, aligning with the simulation/optimization glossary hierarchyKPInow accepts either legacyfnor composablemetric+aggregationpair (backwards compatible)final_value,trajectory_mean,max_value,min_valuemean_agg,std_agg,percentile_agg,probability_above,probability_belowEvaluationResultnow includes per-rundistributionsfor metric-based KPIsCloses #118
Test plan
KPI(fn=...)usage unchangedKPI(metric=..., aggregation=...)composable API testedper_run()and distributions populated correctly🤖 Generated with Claude Code