Skip to content

Feat/structured comparison result - #22

Merged
RLungWu merged 3 commits into
mainfrom
feat/structured-comparison-result
Aug 28, 2026
Merged

Feat/structured comparison result#22
RLungWu merged 3 commits into
mainfrom
feat/structured-comparison-result

Conversation

@RLungWu

@RLungWu RLungWu commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Problem

What situation existed before this change? Why did it need to change?

Change

What did you actually do? Summarize the change, not the diff line-by-line.

Design Decisions

Any non-obvious choices made while implementing this — trade-offs, rejected
alternatives, or anything a future reader would ask "why did you do it this
way?" about.

Validation

  • pytest passes
  • ruff check . passes
  • mypy src passes
  • New behavior is covered by tests (unit / integration / golden)

Risks

What could this break? What wasn't tested? What assumptions might not hold
for other inputs or backends?

Related

  • Closes #
  • Milestone:
  • ADR (if applicable):

@RLungWu
RLungWu merged commit e23d693 into main Aug 28, 2026
1 check passed
@RLungWu
RLungWu deleted the feat/structured-comparison-result branch August 28, 2026 10:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cd92ec317

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +110 to +113
value = run.summary_metrics[metric]
if value is None:
missing_value_run_ids.append(run.run_id)
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject non-finite summary values before aggregating

When a source reports NaN or infinity, which the canonical float fields currently permit, this check treats the value as usable because it rejects only None. A NaN pair then produces NaN aggregates while being counted as non-positive, yielding a misleading positive_pair_rate of zero; infinities can similarly create invalid differences. Reject non-finite values with a ComparisonError before indexing them.

Useful? React with 👍 / 👎.

Comment on lines +75 to +78
mean_difference=sum(raw_differences) / len(raw_differences),
median_difference=median(raw_differences),
mean_improvement=sum(improvements) / len(improvements),
median_improvement=median(improvements),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a cancellation-resistant mean calculation

For paired differences with mixed signs and substantially different magnitudes, ordinary sum can lose smaller terms and report the wrong mean; for example, differences [1e16, 1, -1e16] produce 0.0 here instead of approximately 0.333. Because mean effect is a primary comparison result, use a numerically stable summation such as math.fsum for both raw differences and improvements.

Useful? React with 👍 / 👎.

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