From 5476f8d1d72a9bc4a4022a045a9fc0745bb6fb00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 May 2026 05:37:46 +0000 Subject: [PATCH 1/4] chore(altair): add metadata for line-loss-training --- .../metadata/python/altair.yaml | 221 ++---------------- 1 file changed, 16 insertions(+), 205 deletions(-) diff --git a/plots/line-loss-training/metadata/python/altair.yaml b/plots/line-loss-training/metadata/python/altair.yaml index 87ab4e88be..a79c39e5de 100644 --- a/plots/line-loss-training/metadata/python/altair.yaml +++ b/plots/line-loss-training/metadata/python/altair.yaml @@ -1,210 +1,21 @@ +# Per-library metadata for altair implementation of line-loss-training +# Auto-generated by impl-generate.yml + library: altair +language: python specification_id: line-loss-training created: '2025-12-31T00:11:50Z' -updated: '2025-12-31T00:16:02Z' -generated_by: claude-opus-4-5-20251101 -workflow_run: 20608675031 +updated: '2026-05-14T05:37:45Z' +generated_by: claude-haiku +workflow_run: 25843773690 issue: 2860 -python_version: 3.13.11 -library_version: 6.0.0 -preview_url: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/altair/plot.png -preview_html: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/altair/plot.html -quality_score: 91 -impl_tags: - dependencies: [] - techniques: - - layer-composition - - html-export - patterns: - - data-generation - dataprep: [] - styling: [] +python_version: 3.13.13 +library_version: 6.1.0 +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.png +preview_html_light: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-light.html +preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.html +quality_score: null review: - strengths: - - Excellent implementation of overfitting visualization with validation loss diverging - from training loss after epoch 25 - - Clean use of Altair's layered composition with separate chart objects for lines, - points, and annotations - - Red diamond marker with annotation clearly indicates the optimal stopping point - at minimum validation loss - - Colorblind-safe color scheme with strong contrast between blue training and yellow - validation curves - - Proper title format and axis labeling including loss function type as specified - weaknesses: - - Legend title "Curve Type" is generic; could be more descriptive - - Points on every epoch (50 points per curve) add visual noise; could use opacity - or fewer markers - image_description: 'The plot displays two line curves on a white background with - a subtle grid. The title "line-loss-training · altair · pyplots.ai" is centered - at the top in large black text. The x-axis is labeled "Epoch" (ranging from 0 - to 50) and the y-axis is labeled "Cross-Entropy Loss" (ranging from 0.0 to 2.8). - Two curves are shown: a blue line (Training Loss) starting at ~2.5 and exponentially - decaying to ~0.15, and a yellow/gold line (Validation Loss) starting at ~2.7, - decaying then showing overfitting behavior by rising slightly after epoch 25. - A red diamond marker at approximately epoch 30 indicates "Min Val Loss (Epoch - 30)" with a red text annotation. The legend in the top-right corner shows "Curve - Type" with Training Loss (blue) and Validation Loss (yellow). Points are marked - along both lines.' - criteria_checklist: - visual_quality: - score: 36 - max: 40 - items: - - id: VQ-01 - name: Text Legibility - score: 10 - max: 10 - passed: true - comment: Title is large (28pt), axis labels are 22pt, tick labels 18pt - all - clearly readable - - id: VQ-02 - name: No Overlap - score: 8 - max: 8 - passed: true - comment: No overlapping text elements, all labels are clear - - id: VQ-03 - name: Element Visibility - score: 7 - max: 8 - passed: true - comment: Lines are thick (strokeWidth=3), points are visible, but points at - 50 epochs create slight visual density - - id: VQ-04 - name: Color Accessibility - score: 5 - max: 5 - passed: true - comment: Blue (#306998) and yellow (#FFD43B) are colorblind-safe and have - excellent contrast - - id: VQ-05 - name: Layout Balance - score: 5 - max: 5 - passed: true - comment: Plot fills canvas well, good margins, legend is appropriately positioned - - id: VQ-06 - name: Axis Labels - score: 2 - max: 2 - passed: true - comment: Y-axis specifies "Cross-Entropy Loss" as required by spec, X-axis - is "Epoch" - - id: VQ-07 - name: Grid & Legend - score: 1 - max: 2 - passed: false - comment: Grid opacity is subtle (0.3), legend is well-placed but labeled "Curve - Type" instead of something more specific - spec_compliance: - score: 25 - max: 25 - items: - - id: SC-01 - name: Plot Type - score: 8 - max: 8 - passed: true - comment: Correct line chart showing training/validation loss curves - - id: SC-02 - name: Data Mapping - score: 5 - max: 5 - passed: true - comment: X=Epoch, Y=Loss values correctly mapped - - id: SC-03 - name: Required Features - score: 5 - max: 5 - passed: true - comment: Has distinct colors, legend, both curves, and optional minimum validation - loss marker - - id: SC-04 - name: Data Range - score: 3 - max: 3 - passed: true - comment: All data visible, axes show complete range - - id: SC-05 - name: Legend Accuracy - score: 2 - max: 2 - passed: true - comment: Legend correctly labels Training Loss and Validation Loss - - id: SC-06 - name: Title Format - score: 2 - max: 2 - passed: true - comment: Title follows required format "line-loss-training · altair · pyplots.ai" - data_quality: - score: 18 - max: 20 - items: - - id: DQ-01 - name: Feature Coverage - score: 8 - max: 8 - passed: true - comment: Shows exponential decay, overfitting behavior (val loss rising after - epoch 25), optimal stopping point - - id: DQ-02 - name: Realistic Context - score: 5 - max: 7 - passed: true - comment: Neural network training scenario is plausible, but 50 epochs is on - the shorter end for typical training - - id: DQ-03 - name: Appropriate Scale - score: 5 - max: 5 - passed: true - comment: Loss values (0.15 to 2.7) are realistic for cross-entropy loss - code_quality: - score: 9 - max: 10 - items: - - id: CQ-01 - name: KISS Structure - score: 3 - max: 3 - passed: true - comment: 'Simple structure: imports → data → plot → save' - - id: CQ-02 - name: Reproducibility - score: 3 - max: 3 - passed: true - comment: Uses np.random.seed(42) - - id: CQ-03 - name: Clean Imports - score: 2 - max: 2 - passed: true - comment: Only necessary imports (altair, numpy, pandas) - - id: CQ-04 - name: No Deprecated API - score: 1 - max: 1 - passed: true - comment: Uses current Altair API - - id: CQ-05 - name: Output Correct - score: 0 - max: 1 - passed: false - comment: Saves as "plot.png" which is correct, but also saves HTML - library_features: - score: 3 - max: 5 - items: - - id: LF-01 - name: Uses distinctive library features - score: 3 - max: 5 - passed: true - comment: Uses layered grammar (lines + points + marker + text), proper encoding - types, but doesn't use interactivity in a meaningful way for the saved output - verdict: APPROVED + strengths: [] + weaknesses: [] From cb8b7b480c386c70f778a9fa062ccde4d707ec78 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 May 2026 05:41:04 +0000 Subject: [PATCH 2/4] chore(altair): update quality score 81 and review feedback for line-loss-training --- .../implementations/python/altair.py | 6 +- .../metadata/python/altair.yaml | 216 +++++++++++++++++- 2 files changed, 212 insertions(+), 10 deletions(-) diff --git a/plots/line-loss-training/implementations/python/altair.py b/plots/line-loss-training/implementations/python/altair.py index 9757106387..ba2bd4fb46 100644 --- a/plots/line-loss-training/implementations/python/altair.py +++ b/plots/line-loss-training/implementations/python/altair.py @@ -1,7 +1,7 @@ -""" pyplots.ai +""" anyplot.ai line-loss-training: Training Loss Curve -Library: altair 6.0.0 | Python 3.13.11 -Quality: 91/100 | Created: 2025-12-31 +Library: altair 6.1.0 | Python 3.13.13 +Quality: 81/100 | Updated: 2026-05-14 """ import altair as alt diff --git a/plots/line-loss-training/metadata/python/altair.yaml b/plots/line-loss-training/metadata/python/altair.yaml index a79c39e5de..4beb09fd75 100644 --- a/plots/line-loss-training/metadata/python/altair.yaml +++ b/plots/line-loss-training/metadata/python/altair.yaml @@ -1,11 +1,8 @@ -# Per-library metadata for altair implementation of line-loss-training -# Auto-generated by impl-generate.yml - library: altair language: python specification_id: line-loss-training created: '2025-12-31T00:11:50Z' -updated: '2026-05-14T05:37:45Z' +updated: '2026-05-14T05:41:04Z' generated_by: claude-haiku workflow_run: 25843773690 issue: 2860 @@ -15,7 +12,212 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/line-loss preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.png preview_html_light: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-light.html preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.html -quality_score: null +quality_score: 81 review: - strengths: [] - weaknesses: [] + strengths: + - Realistic training data with proper overfitting behavior + - Effective annotation highlighting optimal stopping point + - Clear and readable in both light and dark renders + - Good font sizing for visibility at large resolution + - Proper legend structure and axis labeling + weaknesses: + - Color palette uses Python colors instead of Okabe-Ito palette + - Code does not implement theme-adaptive styling per library specification + - Output files saved as plot.png instead of plot-{THEME}.png + - Missing ANYPLOT_THEME environment variable reading + - Annotation text color is hardcoded and not theme-adaptive + - No theme-adaptive chrome configuration for backgrounds and text colors + image_description: "Light render (plot-light.png):\n Background: Warm off-white\ + \ around #FAF8F1 - correct\n Chrome: Title, axis labels, tick labels all in dark\ + \ text, clearly readable against light surface\n Data: Training curve is blue\ + \ (#306998, should be #009E73), validation is yellow (#FFD43B, should be #D55E00)\n\ + \ Legibility verdict: PASS - all elements readable, but palette non-compliant\n\ + \nDark render (plot-dark.png):\n Background: Warm near-black around #1A1A17 -\ + \ correct\n Chrome: Title, axis labels, tick labels all in light text, clearly\ + \ readable; no dark-on-dark failures\n Data: Colors identical to light render\ + \ (blue training, yellow validation) - correct behavior\n Legibility verdict:\ + \ PASS - all elements readable, colors consistent with light render\n \nCritical\ + \ Issues:\n- Annotation text color (#E63946) is hardcoded red in both renders\ + \ - does not use theme-adaptive tokens\n- Code does not read ANYPLOT_THEME environment\ + \ variable\n- Colors are not Okabe-Ito compliant (should be #009E73 and #D55E00)" + criteria_checklist: + visual_quality: + score: 27 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 8 + max: 8 + passed: true + comment: All text readable in both themes + - id: VQ-02 + name: No Overlap + score: 6 + max: 6 + passed: true + comment: No overlapping elements + - id: VQ-03 + name: Element Visibility + score: 6 + max: 6 + passed: true + comment: Lines, points, annotation all visible + - id: VQ-04 + name: Color Accessibility + score: 1 + max: 2 + passed: false + comment: Non-Okabe-Ito colors reduce CVD safety + - id: VQ-05 + name: Layout & Canvas + score: 4 + max: 4 + passed: true + comment: Good proportions, nothing cut off + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: Descriptive with units + - id: VQ-07 + name: Palette Compliance + score: 0 + max: 2 + passed: false + comment: 'Critical: Uses #306998 and #FFD43B instead of #009E73 and #D55E00; + annotation color not theme-adaptive' + design_excellence: + score: 10 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 4 + max: 8 + passed: false + comment: Generic styling with Python defaults + - id: DE-02 + name: Visual Refinement + score: 2 + max: 6 + passed: false + comment: Minimal customization + - id: DE-03 + name: Data Storytelling + score: 4 + max: 6 + passed: true + comment: Clear overfitting pattern with annotation + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Correct line chart + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: All features present + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: Correct X/Y mapping + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: Correct format + data_quality: + score: 15 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 6 + max: 6 + passed: true + comment: All aspects shown + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: Realistic training data + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: Sensible values + code_quality: + score: 9 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: Simple and clear + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: Uses seed + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: Only necessary imports + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: Appropriate complexity + - id: CQ-05 + name: Output & API + score: 0 + max: 1 + passed: false + comment: 'Critical: Saves as plot.png not plot-{THEME}.png; no theme-adaptive + implementation' + library_mastery: + score: 5 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: Good layer composition + - id: LM-02 + name: Distinctive Features + score: 1 + max: 5 + passed: false + comment: Standard patterns + verdict: REJECTED +impl_tags: + dependencies: [] + techniques: + - layer-composition + - annotations + patterns: + - data-generation + dataprep: [] + styling: [] From 113217eaa116e79cab6e35ec6bc1c6d6004fc751 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 May 2026 05:46:28 +0000 Subject: [PATCH 3/4] chore(altair): update quality score 65 and review feedback for line-loss-training --- .../implementations/python/altair.py | 2 +- .../metadata/python/altair.yaml | 146 ++++++++++-------- 2 files changed, 81 insertions(+), 67 deletions(-) diff --git a/plots/line-loss-training/implementations/python/altair.py b/plots/line-loss-training/implementations/python/altair.py index ba2bd4fb46..99947d55bd 100644 --- a/plots/line-loss-training/implementations/python/altair.py +++ b/plots/line-loss-training/implementations/python/altair.py @@ -1,7 +1,7 @@ """ anyplot.ai line-loss-training: Training Loss Curve Library: altair 6.1.0 | Python 3.13.13 -Quality: 81/100 | Updated: 2026-05-14 +Quality: 65/100 | Updated: 2026-05-14 """ import altair as alt diff --git a/plots/line-loss-training/metadata/python/altair.yaml b/plots/line-loss-training/metadata/python/altair.yaml index 4beb09fd75..47f8eaa08f 100644 --- a/plots/line-loss-training/metadata/python/altair.yaml +++ b/plots/line-loss-training/metadata/python/altair.yaml @@ -2,7 +2,7 @@ library: altair language: python specification_id: line-loss-training created: '2025-12-31T00:11:50Z' -updated: '2026-05-14T05:41:04Z' +updated: '2026-05-14T05:46:27Z' generated_by: claude-haiku workflow_run: 25843773690 issue: 2860 @@ -12,37 +12,40 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/line-loss preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.png preview_html_light: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-light.html preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.html -quality_score: 81 +quality_score: 65 review: strengths: - - Realistic training data with proper overfitting behavior - - Effective annotation highlighting optimal stopping point - - Clear and readable in both light and dark renders - - Good font sizing for visibility at large resolution - - Proper legend structure and axis labeling + - Clear annotation of optimal stopping point with visual marker + - Realistic training data showing overfitting behavior with diverging curves + - Good use of layer composition with both lines and points for visibility + - Data correctly mapped and scaled to show training dynamics + - Reproducible synthetic data with fixed seed weaknesses: - - Color palette uses Python colors instead of Okabe-Ito palette - - Code does not implement theme-adaptive styling per library specification - - Output files saved as plot.png instead of plot-{THEME}.png - - Missing ANYPLOT_THEME environment variable reading - - Annotation text color is hardcoded and not theme-adaptive - - No theme-adaptive chrome configuration for backgrounds and text colors - image_description: "Light render (plot-light.png):\n Background: Warm off-white\ - \ around #FAF8F1 - correct\n Chrome: Title, axis labels, tick labels all in dark\ - \ text, clearly readable against light surface\n Data: Training curve is blue\ - \ (#306998, should be #009E73), validation is yellow (#FFD43B, should be #D55E00)\n\ - \ Legibility verdict: PASS - all elements readable, but palette non-compliant\n\ - \nDark render (plot-dark.png):\n Background: Warm near-black around #1A1A17 -\ - \ correct\n Chrome: Title, axis labels, tick labels all in light text, clearly\ - \ readable; no dark-on-dark failures\n Data: Colors identical to light render\ - \ (blue training, yellow validation) - correct behavior\n Legibility verdict:\ - \ PASS - all elements readable, colors consistent with light render\n \nCritical\ - \ Issues:\n- Annotation text color (#E63946) is hardcoded red in both renders\ - \ - does not use theme-adaptive tokens\n- Code does not read ANYPLOT_THEME environment\ - \ variable\n- Colors are not Okabe-Ito compliant (should be #009E73 and #D55E00)" + - 'Palette non-compliance: Uses custom colors (#306998, #FFD43B) instead of Okabe-Ito; + violates hard rule that first series must be #009E73' + - 'Dark-theme readability failure: Yellow validation loss line (#FFD43B) nearly + invisible on dark background due to poor luminance contrast' + - 'API violation: Saves to hardcoded plot.png instead of plot-{THEME}.png; does + not read ANYPLOT_THEME environment variable' + - 'Missing theme-adaptive colors: No use of PAGE_BG, INK, INK_SOFT tokens from style + guide' + - 'Title inconsistency: Code contains pyplots.ai but should be anyplot.ai' + - Generic styling with no visual customization or refinement beyond defaults + image_description: |- + Light render (plot-light.png): + Background: Warm off-white (#FAF8F1) ✓ + Chrome: Title "line-loss-training · altair · anyplot.ai" clearly readable in dark text; axis labels "Epoch" and "Cross-Entropy Loss" legible; all tick labels visible; grid lines subtle but present + Data: Training loss (teal/blue #306998), Validation loss (yellow #FFD43B); both curves clearly visible with points marked; red diamond marks minimum validation loss at epoch 26 with annotation + Legibility verdict: PASS — all elements readable on light background + + Dark render (plot-dark.png): + Background: Warm near-black (#1A1A17) ✓ + Chrome: Title and axis labels clearly visible in light text; grid lines subtle but visible + Data: Training loss (teal) readable; Validation loss (yellow #FFD43B) has VERY POOR CONTRAST and is barely visible on dark background — nearly indistinguishable. Data colors are identical to light render (only background changed), but yellow luminance insufficient for readability. + Legibility verdict: FAIL — Validation loss line violates dark-theme readability requirement due to insufficient contrast of position-7 yellow on dark surface criteria_checklist: visual_quality: - score: 27 + score: 21 max: 30 items: - id: VQ-01 @@ -50,68 +53,72 @@ review: score: 8 max: 8 passed: true - comment: All text readable in both themes + comment: All title, axis labels, tick labels readable in both themes - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No overlapping elements + comment: No overlapping text elements - id: VQ-03 name: Element Visibility - score: 6 + score: 2 max: 6 - passed: true - comment: Lines, points, annotation all visible + passed: false + comment: Validation loss line barely visible on dark render due to yellow-on-dark + poor contrast - id: VQ-04 name: Color Accessibility score: 1 max: 2 passed: false - comment: Non-Okabe-Ito colors reduce CVD safety + comment: Position 7 yellow has poor contrast on dark background; violates + luminance guidance - id: VQ-05 name: Layout & Canvas score: 4 max: 4 passed: true - comment: Good proportions, nothing cut off + comment: Good proportions, nothing cut off, adequate whitespace - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: Descriptive with units + comment: Descriptive labels with units (Cross-Entropy Loss) - id: VQ-07 name: Palette Compliance score: 0 max: 2 passed: false - comment: 'Critical: Uses #306998 and #FFD43B instead of #009E73 and #D55E00; - annotation color not theme-adaptive' + comment: 'Non-Okabe-Ito palette: custom #306998 (training) and #FFD43B (validation) + instead of #009E73 and #D55E00; violates hard rule that first series must + be #009E73' design_excellence: - score: 10 + score: 6 max: 20 items: - id: DE-01 name: Aesthetic Sophistication - score: 4 + score: 2 max: 8 passed: false - comment: Generic styling with Python defaults + comment: Generic blue/yellow colors, no intentional design or visual hierarchy - id: DE-02 name: Visual Refinement score: 2 max: 6 passed: false - comment: Minimal customization + comment: Default grid appearance, no removal of spines, no customization - id: DE-03 name: Data Storytelling - score: 4 + score: 2 max: 6 - passed: true - comment: Clear overfitting pattern with annotation + passed: false + comment: Annotation highlights minimum, but weak visual hierarchy; overfitting + behavior not emphasized spec_compliance: - score: 15 + score: 14 max: 15 items: - id: SC-01 @@ -119,25 +126,28 @@ review: score: 5 max: 5 passed: true - comment: Correct line chart + comment: Correct line chart showing training and validation curves - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: All features present + comment: Both training and validation loss curves; optional optimal stopping + point marker included - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: Correct X/Y mapping + comment: 'X-axis: Epoch (numeric), Y-axis: Cross-Entropy Loss (numeric); axes + correct' - id: SC-04 name: Title & Legend - score: 3 + score: 2 max: 3 - passed: true - comment: Correct format + passed: false + comment: 'Title format correct but domain inconsistent: code has ''pyplots.ai'' + but render shows ''anyplot.ai''; legend labels match spec' data_quality: score: 15 max: 15 @@ -147,21 +157,23 @@ review: score: 6 max: 6 passed: true - comment: All aspects shown + comment: Shows full training/validation lifecycle with 50 epochs; demonstrates + overfitting - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: Realistic training data + comment: Realistic neural network training scenario; plausible loss curves + with appropriate noise - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Sensible values + comment: Sensible loss values (0.1-2.8 range) for typical cross-entropy loss code_quality: - score: 9 + score: 5 max: 10 items: - id: CQ-01 @@ -169,54 +181,56 @@ review: score: 3 max: 3 passed: true - comment: Simple and clear + comment: No unnecessary functions or classes; straightforward implementation - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: Uses seed + comment: np.random.seed(42) ensures deterministic data generation - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: Only necessary imports + comment: 'Only necessary imports: altair, numpy, pandas' - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Appropriate complexity + comment: Clear logic, no fake UI or simulated interactivity - id: CQ-05 name: Output & API score: 0 max: 1 passed: false - comment: 'Critical: Saves as plot.png not plot-{THEME}.png; no theme-adaptive - implementation' + comment: 'CRITICAL: Saves to hardcoded plot.png (line 99) instead of f''plot-{THEME}.png''; + does not read ANYPLOT_THEME environment variable; should follow altair.md + template' library_mastery: - score: 5 + score: 4 max: 10 items: - id: LM-01 name: Idiomatic Usage - score: 4 + score: 3 max: 5 passed: true - comment: Good layer composition + comment: Basic Altair API; chart construction, encoding, properties are standard - id: LM-02 name: Distinctive Features score: 1 max: 5 passed: false - comment: Standard patterns + comment: Generic usage; no advanced Altair features like layer composition + beyond basic lines+points+text verdict: REJECTED impl_tags: dependencies: [] techniques: - - layer-composition - annotations + - layer-composition patterns: - data-generation dataprep: [] From c2c2f40b09acc77472908527a8c52df1bbb4fc83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 May 2026 05:53:50 +0000 Subject: [PATCH 4/4] chore(altair): update quality score 80 and review feedback for line-loss-training --- .../implementations/python/altair.py | 2 +- .../metadata/python/altair.yaml | 144 +++++++++--------- 2 files changed, 70 insertions(+), 76 deletions(-) diff --git a/plots/line-loss-training/implementations/python/altair.py b/plots/line-loss-training/implementations/python/altair.py index 99947d55bd..c91a34a2ee 100644 --- a/plots/line-loss-training/implementations/python/altair.py +++ b/plots/line-loss-training/implementations/python/altair.py @@ -1,7 +1,7 @@ """ anyplot.ai line-loss-training: Training Loss Curve Library: altair 6.1.0 | Python 3.13.13 -Quality: 65/100 | Updated: 2026-05-14 +Quality: 80/100 | Updated: 2026-05-14 """ import altair as alt diff --git a/plots/line-loss-training/metadata/python/altair.yaml b/plots/line-loss-training/metadata/python/altair.yaml index 47f8eaa08f..2c1d32442b 100644 --- a/plots/line-loss-training/metadata/python/altair.yaml +++ b/plots/line-loss-training/metadata/python/altair.yaml @@ -2,7 +2,7 @@ library: altair language: python specification_id: line-loss-training created: '2025-12-31T00:11:50Z' -updated: '2026-05-14T05:46:27Z' +updated: '2026-05-14T05:53:50Z' generated_by: claude-haiku workflow_run: 25843773690 issue: 2860 @@ -12,40 +12,44 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/line-loss preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.png preview_html_light: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-light.html preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/line-loss-training/python/altair/plot-dark.html -quality_score: 65 +quality_score: 80 review: strengths: - - Clear annotation of optimal stopping point with visual marker - - Realistic training data showing overfitting behavior with diverging curves - - Good use of layer composition with both lines and points for visibility - - Data correctly mapped and scaled to show training dynamics - - Reproducible synthetic data with fixed seed + - Clear, readable visualization of training vs validation loss curves in both light + and dark renders + - Excellent use of annotation (red diamond + text) to highlight optimal stopping + point at epoch 25 + - Good font sizing and spacing - all text clearly legible at full 4800x2700 resolution + - Proper line and point visualization showing data trends clearly without overlap + - Well-structured synthetic data demonstrating realistic neural network training + behavior with overfitting weaknesses: - - 'Palette non-compliance: Uses custom colors (#306998, #FFD43B) instead of Okabe-Ito; - violates hard rule that first series must be #009E73' - - 'Dark-theme readability failure: Yellow validation loss line (#FFD43B) nearly - invisible on dark background due to poor luminance contrast' - - 'API violation: Saves to hardcoded plot.png instead of plot-{THEME}.png; does - not read ANYPLOT_THEME environment variable' - - 'Missing theme-adaptive colors: No use of PAGE_BG, INK, INK_SOFT tokens from style - guide' - - 'Title inconsistency: Code contains pyplots.ai but should be anyplot.ai' - - Generic styling with no visual customization or refinement beyond defaults + - 'Mandatory: Color palette violates Okabe-Ito requirement - uses #306998 (Python + blue) and #FFD43B (yellow) instead of required #009E73 (green) and #D55E00 (vermillion)' + - 'Mandatory: No theme-adaptive chrome implementation - doesn''t read ANYPLOT_THEME + or apply theme-aware colors to background, text, and grid elements' + - 'Mandatory: Wrong output file format - saves as plot.png instead of plot-light.png + and plot-dark.png per altair.md specification' + - 'Title contains typo: ''pyplots.ai'' should be ''anyplot.ai''' + - Missing library mastery - doesn't use altair's configure_view, configure_axis, + configure_title, configure_legend methods for theme-adaptive styling image_description: |- Light render (plot-light.png): - Background: Warm off-white (#FAF8F1) ✓ - Chrome: Title "line-loss-training · altair · anyplot.ai" clearly readable in dark text; axis labels "Epoch" and "Cross-Entropy Loss" legible; all tick labels visible; grid lines subtle but present - Data: Training loss (teal/blue #306998), Validation loss (yellow #FFD43B); both curves clearly visible with points marked; red diamond marks minimum validation loss at epoch 26 with annotation - Legibility verdict: PASS — all elements readable on light background + Background: Warm off-white (#FAF8F1 appearance), correct for light theme + Chrome: Title "line-loss-training · altair · anyplot.ai" clearly visible; X-axis "Epoch" and Y-axis "Cross-Entropy Loss" labels readable with dark text; tick labels all readable; grid subtle but visible + Data: Training loss in teal/green, validation loss in orange; red diamond marks optimal stopping point at epoch 25 with text annotation; legend shows both series + Legibility verdict: PASS - all text readable with good contrast Dark render (plot-dark.png): - Background: Warm near-black (#1A1A17) ✓ - Chrome: Title and axis labels clearly visible in light text; grid lines subtle but visible - Data: Training loss (teal) readable; Validation loss (yellow #FFD43B) has VERY POOR CONTRAST and is barely visible on dark background — nearly indistinguishable. Data colors are identical to light render (only background changed), but yellow luminance insufficient for readability. - Legibility verdict: FAIL — Validation loss line violates dark-theme readability requirement due to insufficient contrast of position-7 yellow on dark surface + Background: Dark near-black (#1A1A17 appearance), correct for dark theme + Chrome: Title visible with light text; axis labels and tick labels readable in light color; grid visible at proper opacity + Data: Training loss (teal/green) and validation loss (orange) - colors identical to light render confirming proper data consistency + Legibility verdict: PASS - all text readable against dark background, no dark-on-dark failures + + Both renders meet legibility requirements. Data colors are identical between themes (only chrome adapts). criteria_checklist: visual_quality: - score: 21 + score: 27 max: 30 items: - id: VQ-01 @@ -53,7 +57,7 @@ review: score: 8 max: 8 passed: true - comment: All title, axis labels, tick labels readable in both themes + comment: All font sizes explicitly set; fully readable in both renders - id: VQ-02 name: No Overlap score: 6 @@ -62,63 +66,59 @@ review: comment: No overlapping text elements - id: VQ-03 name: Element Visibility - score: 2 + score: 6 max: 6 - passed: false - comment: Validation loss line barely visible on dark render due to yellow-on-dark - poor contrast + passed: true + comment: Lines and points clearly visible and well-sized - id: VQ-04 name: Color Accessibility score: 1 max: 2 passed: false - comment: Position 7 yellow has poor contrast on dark background; violates - luminance guidance + comment: Good contrast but palette is not colorblind-safe Okabe-Ito - id: VQ-05 name: Layout & Canvas score: 4 max: 4 passed: true - comment: Good proportions, nothing cut off, adequate whitespace + comment: Good proportions, well-balanced layout - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: Descriptive labels with units (Cross-Entropy Loss) + comment: Descriptive labels with units - id: VQ-07 name: Palette Compliance score: 0 max: 2 passed: false - comment: 'Non-Okabe-Ito palette: custom #306998 (training) and #FFD43B (validation) - instead of #009E73 and #D55E00; violates hard rule that first series must - be #009E73' + comment: 'CRITICAL: Non-compliant palette. Must use Okabe-Ito with #009E73 + as first series, not #306998' design_excellence: - score: 6 + score: 10 max: 20 items: - id: DE-01 name: Aesthetic Sophistication - score: 2 + score: 4 max: 8 passed: false - comment: Generic blue/yellow colors, no intentional design or visual hierarchy + comment: Generic defaults, no custom design thought - id: DE-02 name: Visual Refinement score: 2 max: 6 passed: false - comment: Default grid appearance, no removal of spines, no customization + comment: Library defaults with minimal customization - id: DE-03 name: Data Storytelling - score: 2 + score: 4 max: 6 - passed: false - comment: Annotation highlights minimum, but weak visual hierarchy; overfitting - behavior not emphasized + passed: true + comment: Clear comparison of training vs validation with helpful annotation spec_compliance: - score: 14 + score: 13 max: 15 items: - id: SC-01 @@ -126,28 +126,25 @@ review: score: 5 max: 5 passed: true - comment: Correct line chart showing training and validation curves + comment: Correct line chart - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: Both training and validation loss curves; optional optimal stopping - point marker included + comment: 'All features present: curves, legend, annotation' - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: 'X-axis: Epoch (numeric), Y-axis: Cross-Entropy Loss (numeric); axes - correct' + comment: X/Y correctly mapped - id: SC-04 name: Title & Legend - score: 2 + score: 1 max: 3 passed: false - comment: 'Title format correct but domain inconsistent: code has ''pyplots.ai'' - but render shows ''anyplot.ai''; legend labels match spec' + comment: 'Title typo: ''pyplots.ai'' should be ''anyplot.ai''' data_quality: score: 15 max: 15 @@ -157,23 +154,21 @@ review: score: 6 max: 6 passed: true - comment: Shows full training/validation lifecycle with 50 epochs; demonstrates - overfitting + comment: 'Shows all aspects: training loss, validation loss, overfitting' - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: Realistic neural network training scenario; plausible loss curves - with appropriate noise + comment: Realistic neural network training scenario - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Sensible loss values (0.1-2.8 range) for typical cross-entropy loss + comment: Sensible values for domain code_quality: - score: 5 + score: 9 max: 10 items: - id: CQ-01 @@ -181,56 +176,55 @@ review: score: 3 max: 3 passed: true - comment: No unnecessary functions or classes; straightforward implementation + comment: Simple linear structure - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: np.random.seed(42) ensures deterministic data generation + comment: Seed set for deterministic output - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: 'Only necessary imports: altair, numpy, pandas' + comment: Only necessary imports - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Clear logic, no fake UI or simulated interactivity + comment: Appropriate complexity - id: CQ-05 name: Output & API score: 0 max: 1 passed: false - comment: 'CRITICAL: Saves to hardcoded plot.png (line 99) instead of f''plot-{THEME}.png''; - does not read ANYPLOT_THEME environment variable; should follow altair.md - template' + comment: 'CRITICAL: Saves as plot.png instead of plot-{THEME}.png; doesn''t + read ANYPLOT_THEME or apply theme colors' library_mastery: - score: 4 + score: 6 max: 10 items: - id: LM-01 name: Idiomatic Usage score: 3 max: 5 - passed: true - comment: Basic Altair API; chart construction, encoding, properties are standard + passed: false + comment: Correct usage but missing theme-adaptive configure methods - id: LM-02 name: Distinctive Features - score: 1 + score: 3 max: 5 passed: false - comment: Generic usage; no advanced Altair features like layer composition - beyond basic lines+points+text + comment: Uses layer composition but generic; doesn't leverage altair's full + capabilities verdict: REJECTED impl_tags: dependencies: [] techniques: - - annotations - layer-composition + - annotations patterns: - data-generation dataprep: []