Skip to content

Commit cc7d6d8

Browse files
Check equal issue for open division + check accuracy run covers all the dataset (#2170)
Co-authored-by: Miro <mirhodak@amd.com>
1 parent 654b6ec commit cc7d6d8

File tree

1 file changed

+56
-4
lines changed

1 file changed

+56
-4
lines changed

tools/submission/submission_checker.py

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,22 @@
188188
"stable-diffusion-xl": 5000,
189189
"mixtral-8x7b": 15000,
190190
},
191+
"dataset-size": {
192+
"resnet": 50000,
193+
"retinanet": 24781,
194+
"bert-99": 10833,
195+
"bert-99.9": 10833,
196+
"dlrm-v2-99": 204800,
197+
"dlrm-v2-99.9": 204800,
198+
"3d-unet-99": 43,
199+
"3d-unet-99.9": 43,
200+
"gptj-99": 13368,
201+
"gptj-99.9": 13368,
202+
"llama2-70b-99": 24576,
203+
"llama2-70b-99.9": 24576,
204+
"stable-diffusion-xl": 5000,
205+
"mixtral-8x7b": 15000,
206+
},
191207
# TODO: Update this list.
192208
"model_mapping": {
193209
# map model names to the official mlperf model class
@@ -466,6 +482,27 @@
466482
"rgat": 788379,
467483
"pointpainting": 1024,
468484
},
485+
"dataset-size" : {
486+
"resnet": 50000,
487+
"retinanet": 24781,
488+
"bert-99": 10833,
489+
"bert-99.9": 10833,
490+
"dlrm-v2-99": 204800,
491+
"dlrm-v2-99.9": 204800,
492+
"3d-unet-99": 43,
493+
"3d-unet-99.9": 43,
494+
"gptj-99": 13368,
495+
"gptj-99.9": 13368,
496+
"llama2-70b-99": 24576,
497+
"llama2-70b-99.9": 24576,
498+
"llama2-70b-interactive-99": 24576,
499+
"llama2-70b-interactive-99.9": 24576,
500+
"stable-diffusion-xl": 5000,
501+
"mixtral-8x7b": 15000,
502+
"llama3.1-405b": 8313,
503+
"rgat": 788379,
504+
"pointpainting": 39987,
505+
},
469506
# model_mapping.json is expected in the root directory of the
470507
# submission folder for open submissions and so the below dictionary is
471508
# not really needed
@@ -890,6 +927,7 @@ def __init__(
890927
self.accuracy_delta_perc = self.base["accuracy-delta-perc"]
891928
self.accuracy_upper_limit = self.base.get("accuracy-upper-limit", {})
892929
self.performance_sample_count = self.base["performance-sample-count"]
930+
self.dataset_size = self.base["dataset-size"]
893931
self.latency_constraint = self.base.get("latency-constraint", {})
894932
self.min_queries = self.base.get("min-queries", {})
895933
self.required = None
@@ -985,6 +1023,12 @@ def get_min_query_count(self, model, scenario):
9851023
if model not in self.min_queries:
9861024
raise ValueError("model not known: " + model)
9871025
return self.min_queries[model].get(scenario)
1026+
1027+
def get_dataset_size(self, model):
1028+
model = self.get_mlperf_model(model)
1029+
if model not in self.dataset_size:
1030+
raise ValueError("model not known: " + model)
1031+
return self.dataset_size[model]
9881032

9891033
def get_delta_perc(self, model, metric):
9901034
if model in self.accuracy_delta_perc:
@@ -1004,10 +1048,9 @@ def has_new_logging_format(self):
10041048
def uses_early_stopping(self, scenario):
10051049
return scenario in ["Server", "SingleStream", "MultiStream"]
10061050

1007-
def requires_equal_issue(self, model, division):
1051+
def requires_equal_issue(self, model):
10081052
return (
1009-
division in ["closed", "network"]
1010-
and model
1053+
model
10111054
in [
10121055
"3d-unet-99",
10131056
"3d-unet-99.9",
@@ -1320,6 +1363,15 @@ def check_accuracy_dir(config, model, path, verbose):
13201363
"%s has loadgen errors, number of errors: %s", path, mlperf_log.num_errors()
13211364
)
13221365

1366+
# check the whole dataset was used in the accuracy run
1367+
mlperf_log = MLPerfLog(fname)
1368+
qsl_total_count = mlperf_log["qsl_reported_total_count"]
1369+
expected_qsl_total_count = config.get_dataset_size(model)
1370+
if qsl_total_count != expected_qsl_total_count:
1371+
log.error(
1372+
"%s accurcy run does not cover all dataset, accuracy samples: %s, dataset size: %s", path, qsl_total_count, expected_qsl_total_count
1373+
)
1374+
13231375
return is_valid, result_acc
13241376

13251377

@@ -1437,7 +1489,7 @@ def check_performance_dir(
14371489
equal_issue_used_check = (
14381490
mlperf_log["effective_sample_concatenate_permutation"] == True
14391491
)
1440-
if not config.requires_equal_issue(model, division):
1492+
if not config.requires_equal_issue(model):
14411493
equal_issue_used_check = True
14421494
if not equal_issue_used_check:
14431495
log.error(

0 commit comments

Comments
 (0)