Skip to content

Commit e1d1a4f

Browse files
authored
Update submission_checker.py | Prevent empty accuracy in open division (#2097)
* Update submission_checker.py | Prevent empty accuracy in open division * Update test-submission-checker.yml * Fix accuracy RE for pointpainting * Support v4.1 accuracy RE for SDXL
1 parent 9668b86 commit e1d1a4f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/test-submission-checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install dependencies
3333
run: |
34-
python3 -m pip install cm4mlops
34+
python3 -m pip install mlc-scripts
3535
git clone https://github.com/mlcommons/mlperf_inference_unofficial_submissions_v5.0 --depth 1
3636
- name: Test MLPerf inference submission checker
3737
run: |
38-
cm run script --tags=run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/mlperf_inference_unofficial_submissions_v5.0 --src_version=v5.0 --extra_args=" --skip-extra-files-in-root-check --skip-extra-accuracy-files-check" --quiet
38+
mlcr run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/mlperf_inference_unofficial_submissions_v5.0 --src_version=v5.0 --extra_args=" --skip-extra-files-in-root-check --skip-extra-accuracy-files-check" --quiet

tools/submission/submission_checker.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
ACC_PATTERN = {
736736
"acc": r"^(?:\{\"accuracy|accuracy)[\": ]*=?\s*([\d\.]+).*",
737737
"AUC": r"^AUC=([\d\.]+).*",
738-
"mAP": r".*(?:mAP=|Total:)\s*([\d.]+)",
738+
"mAP": r".*(?:mAP=|'Total':)\s*([\d.]+)",
739739
"bleu": r"^BLEU\:\s*([\d\.]+).*",
740740
"F1": r"^{[\"\']exact_match[\"\']\:\s*[\d\.]+,\s*[\"\']f1[\"\']\:\s*([\d\.]+)}",
741741
"WER": r"Word Error Rate\:.*, accuracy=([0-9\.]+)%",
@@ -746,8 +746,8 @@
746746
"ROUGELSUM": r".*'rougeLsum':\s([\d.]+).*",
747747
"GEN_LEN": r".*'gen_len':\s([\d.]+).*",
748748
"TOKENS_PER_SAMPLE": r".*'tokens_per_sample':\s([\d.]+).*",
749-
"CLIP_SCORE": r".*'CLIP_SCORE':\s.([\d.]+).*",
750-
"FID_SCORE": r".*'FID_SCORE':\s.([\d.]+).*",
749+
"CLIP_SCORE": r".*'CLIP_SCORE':\s+'?([\d.]+).*",
750+
"FID_SCORE": r".*'FID_SCORE':\s+'?([\d.]+).*",
751751
"gsm8k_accuracy": r".*'gsm8k':\s([\d.]+).*",
752752
"mbxp_accuracy": r".*'mbxp':\s([\d.]+).*",
753753
"exact_match": r".*'exact_match':\s([\d.]+).*"
@@ -2407,7 +2407,7 @@ def log_result(
24072407
.replace('"', "")
24082408
.replace("{", "")
24092409
.replace("}", "")
2410-
)
2410+
).strip()
24112411
if mlperf_model in REQUIRED_ACC_BENCHMARK:
24122412
if (
24132413
config.version
@@ -2425,7 +2425,7 @@ def log_result(
24252425
missing_files,
24262426
)
24272427
accuracy_is_valid = False
2428-
if not accuracy_is_valid and not is_closed_or_network:
2428+
if not accuracy_is_valid and acc and not is_closed_or_network:
24292429
if debug:
24302430
log.warning(
24312431
"%s, accuracy not valid but taken for open",

0 commit comments

Comments
 (0)