[CI] Remove metrics artifact mechanism from nightly NPU workflows (#35489)

This commit is contained in:
hhhh1252023
2026-09-05 17:16:52 +08:00
committed by GitHub
parent d49180019b
commit 0948e6ebed
4 changed files with 21 additions and 68 deletions
-43
View File
@@ -453,13 +453,6 @@ jobs:
- nightly-poc-multi-node-mix-tests
runs-on: ubuntu-latest
steps:
- name: Download all metrics
uses: actions/download-artifact@v4
with:
pattern: metrics-*
path: /tmp/metrics
merge-multiple: false
- name: Generate results table
run: |
single_result_a2="${{ needs.nightly-1-npu-a2.result }}"
@@ -522,42 +515,6 @@ jobs:
echo "| multi-node-mix-poc | $(group_icon ${mix_result}) ${mix_result} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Per-Test Metrics" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
has_metrics=false
# Each suite job uploads its METRICS_DATA_FILE directory, which
# contains per-case subdirectories with their own metrics.json.
# Recursively find every metrics.json and render one table row per
# test case.
for file in $(find /tmp/metrics -name metrics.json 2>/dev/null); do
if [ -f "$file" ]; then
has_metrics=true
echo "import json" > /tmp/parse_metrics.py
echo "with open('$file') as f:" >> /tmp/parse_metrics.py
echo " d = json.load(f)" >> /tmp/parse_metrics.py
echo "tc = d.get('test_case', '-')" >> /tmp/parse_metrics.py
echo "tp = d.get('test_type', '-')" >> /tmp/parse_metrics.py
echo "st = d.get('status', 'unknown')" >> /tmp/parse_metrics.py
echo "icon = '✅' if st == 'pass' else '❌'" >> /tmp/parse_metrics.py
echo "metrics = d.get('metrics', {})" >> /tmp/parse_metrics.py
echo "baselines = d.get('baselines', {})" >> /tmp/parse_metrics.py
echo "mstr = ', '.join(f'{k}={v}' for k,v in metrics.items()) if metrics else '-'" >> /tmp/parse_metrics.py
echo "bstr = ', '.join(f'{k}={v}' for k,v in baselines.items()) if baselines else '-'" >> /tmp/parse_metrics.py
echo "print(f'| {tc} | {tp} | {icon} {st} | {mstr} | {bstr} |')" >> /tmp/parse_metrics.py
python3 /tmp/parse_metrics.py
fi
done > /tmp/metrics_table.txt
if [ "${has_metrics}" = "true" ]; then
echo "| Test Case | Type | Status | Metrics | Baseline |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|------|--------|---------|----------|" >> $GITHUB_STEP_SUMMARY
cat /tmp/metrics_table.txt >> $GITHUB_STEP_SUMMARY
else
echo "No per-test metrics available (artifacts not found)." >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
FAIL=0
for r in "${single_result_a2}" "${single_result}" "${multi_result}" "${mix_result}"; do
if [ "${r}" != "success" ] && [ "${r}" != "skipped" ]; then FAIL=1; fi