Repository navigation
Distinguish terminal labels that share a long prefix (#1038) - #1074
Merged
yakew7 merged 2 commits intoOct 20, 2026
Merged
Conversation
The terminal renderer clips group labels to 30 characters with a trailing ellipsis. Two labels longer than that which share their first 29 characters clipped to the same text and read as a duplicated row; JSON, CSV and HTML carry the labels whole, so only the terminal was affected. Add _clip_labels, which clips a dimension's labels together and re-clips any that would collide with a middle ellipsis (head...tail) so their differing ends stay visible. Route the profile, reference and compare terminal renderers through it. Non-colliding labels keep the plain trailing ellipsis. Adds a regression test.
Contributor
|
@sammist2 is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
…ew7#1038) test_terminal_reports_keep_long_group_labels_apart asserted that two long labels sharing a 29-character prefix both clip to the same '<29 chars>…' text, which is exactly the duplicated-row behavior yakew7#1038 fixes. Keep the test's intent (each label cut with a marker, the full label never shown) but assert the two rows are now distinct.
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.
Fixes #1038.
The terminal renderer clips group labels to 30 characters with a trailing ellipsis. Two labels longer than that which share their first 29 characters clipped to the same text and read as a duplicated row; JSON, CSV and HTML carry the labels whole, so only the terminal was affected.
Add _clip_labels, which clips a dimension's labels together and re-clips any that would collide with a middle ellipsis (head...tail) so their differing ends stay visible. Route the profile, reference and compare terminal renderers through it. Non-colliding labels keep the plain trailing ellipsis. Adds a regression test.
Summary
Type
Audit checklist
unfair.pyincludes protected attributes and prints the required output formatfair.pyremoves protected attributes and identified proxy variablesrandom_state=42and an 80/20 train/test splitunfair.pngandfair.pngare included as PNG screenshotsDATA.mdis included if the file is too largeREADME.mdincludes the new results row and audit sectionBefore fairness gap:
After fairness gap:
Reduction:
Protected attribute(s):
Proxy variables dropped:
Explainer checklist
explainers/and uses lowercase hyphenated namingREADME.mdwas updatedLinked issue
Closes #