Skip to content

Update endpoints structure#2630

Open
pgmpablo157321 wants to merge 4 commits into
masterfrom
update_endpoints_structure
Open

Update endpoints structure#2630
pgmpablo157321 wants to merge 4 commits into
masterfrom
update_endpoints_structure

Conversation

@pgmpablo157321

Copy link
Copy Markdown
Contributor

Partially address #2628

@pgmpablo157321
pgmpablo157321 requested review from a team as code owners July 14, 2026 05:04
@github-actions

Copy link
Copy Markdown
Contributor

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

This reverts commit 7d8ae1a.
- config.yaml / config.yml (lowest priority)
scenario_dir: path to the scenario directory containing:
- config.yaml (scenario root)
- performance/run_1/results_summary.json (performance metrics)

@nvzhihanj nvzhihanj Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not have run_1 folder in endpoints

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @zihaok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, run_1 is not needed

…tale results.json (#2631)

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>
@@ -24,7 +24,9 @@
"sample_logs")

_RESULT_SUMMARY_FILE = "results_summary.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- config.yaml / config.yml (lowest priority)
scenario_dir: path to the scenario directory containing:
- config.yaml (scenario root)
- performance/run_1/results_summary.json (performance metrics)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, run_1 is not needed

# Alternative JSON paths for endpoints keys that don't directly match the
# JSON structure
ENDPOINTS_JSON_ALT_PATHS = {
"result.total": "results.total",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be
"result.total": ("results.total", "n_samples_completed"), because newly updated endpoint performance log is using n_samples_completed as a indicator of total sample run

# JSON structure
ENDPOINTS_JSON_ALT_PATHS = {
"result.total": "results.total",
"result.failed": "results.failed",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "result.failed": ("results.failed", "n_samples_failed"), same reason as above

ENDPOINTS_JSON_ALT_PATHS = {
"result.total": "results.total",
"result.failed": "results.failed",
"qps": "results.qps",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "qps": ("results.qps", "qps"),

self.messages[qps_key] = [{"key": qps_key, "value": qps}]

# Expose accuracy scores stored in results.json
for result in results_data.get("accuracy_scores", {}).values():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a list instead of a dictionary

for result in results_data.get("accuracy_scores", {}).values():

Suggested change
for result in results_data.get("accuracy_scores", []):

@zihaok

zihaok commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Tested this submission checker with a couple of internal valid log. Find a bug: currently since both accuracy and performance logs are generated together, submission checker will enforce n_samples_issued and n_samples_completed in performance/result_summary.json to be exactly the same size of the dataset. However, this enforcement should be in accuracy log instead of performance log. Performance log should be valid as long as min duration is > 600000 ms, and number of samples > performance dataset size. This is behavior is correct in legacy loadgen's result parsing path, but not correct in endpoint_parser.py

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.

4 participants