Skip to content

fix: skip truncation for endpoints submissions in truncate_accuracy_log.py#2631

Merged
pgmpablo157321 merged 1 commit into
update_endpoints_structurefrom
fix/truncate-accuracy-log-skip-endpoints
Jul 15, 2026
Merged

fix: skip truncation for endpoints submissions in truncate_accuracy_log.py#2631
pgmpablo157321 merged 1 commit into
update_endpoints_structurefrom
fix/truncate-accuracy-log-skip-endpoints

Conversation

@anandhu-eng

Copy link
Copy Markdown
Contributor

Summary

  • _truncate_endpoints_results in truncate_accuracy_log.py targeted accuracy/results.json's responses field, which no longer exists: mlcommons/endpoints#400 renamed the artifact to accuracy/accuracy_results.json and dropped responses entirely (per-sample response text now lives in events.jsonl, which isn't part of the MLPerf submission per submission_structure.md). As a result this codepath currently only ever logs "... missing" for every endpoints submission.
  • Replaced it with _is_endpoints_submission(), which detects the endpoints layout via the scenario-root config.yaml/config.yml (same marker endpoints_parser.py uses) and skips truncation cleanly — there's nothing left in accuracy_results.json that needs shrinking.
  • Removed PERFORMANCE_ENDPOINTS_DIR / ACCURACY_ENDPOINTS_DIR in constants.py — dead since the loader.py refactor onto ENDPOINTS_SCENARIO_DIR in this same update_endpoints_structure branch; no remaining references anywhere in the repo.

Test plan

  • python3 -m py_compile on both changed files
  • submission_checker.main / loader / constants still import cleanly after removing the two dead dicts (wildcard-imported, so a stray reference would NameError at import time)
  • Built a fake endpoints submission tree (config.yaml + performance/run_1/results_summary.json + accuracy/accuracy_results.json) and ran truncate_accuracy_log.py against it — logs the skip message, leaves accuracy_results.json byte-for-byte unchanged, creates no backup files
  • Confirmed standard (non-endpoints) submission codepath is untouched

🤖 Generated with Claude Code

…tale results.json

The endpoints accuracy artifact was renamed from results.json (with a
responses field) to accuracy/accuracy_results.json in
mlcommons/endpoints#400, which also dropped the responses field
entirely (per-sample text now lives in events.jsonl, not part of the
submission). truncate_accuracy_log.py still looked for the old
results.json/responses shape and would only log "missing" for every
endpoints submission. Detect the endpoints layout via the scenario-root
config.yaml and skip truncation, and remove the now-dead
PERFORMANCE_ENDPOINTS_DIR/ACCURACY_ENDPOINTS_DIR constants left over
from the loader.py refactor to ENDPOINTS_SCENARIO_DIR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@anandhu-eng
anandhu-eng requested review from a team as code owners July 15, 2026 08:41
@github-actions

Copy link
Copy Markdown
Contributor

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@pgmpablo157321
pgmpablo157321 merged commit eaa98a7 into update_endpoints_structure Jul 15, 2026
4 checks passed
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.

2 participants