feat: expose metric information in MetricResult#326
Merged
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| " diff = ((base_result - smashed_result) / base_result) * 100\n", | ||
| " row = f\"| {base.name} | {base_result:.4f} {base.metric_units or ''}\"\n", | ||
| " row += f\"| {smashed_result:.4f} {smashed.metric_units or ''} | {diff:.2f}% |\"\n", | ||
| " rows.append(row)\n", |
There was a problem hiding this comment.
Bug: Comparison Table Formatting and Calculation Errors
The make_comparison_table function has two issues. The generated markdown table is malformed due to missing spaces before pipe separators, particularly after metric units. Additionally, the 'Improvement %' calculation might be incorrect when a metric's higher_is_better attribute is None, as it defaults to the 'lower is better' logic.
Additional Locations (1)
johannaSommer
approved these changes
Sep 8, 2025
Member
johannaSommer
left a comment
There was a problem hiding this comment.
Love it!!! LGTM, thanks a lot Sara 🫶🏻
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.
Description
metric_unitsandhigh_is_betteras attributes.from_results_dict.metrics_unitsto the string representation to improve the readability.Related Issue
Fixes #184
Type of Change
How Has This Been Tested?
Checklist
Additional Notes