Skip to content

Commit e04531a

Browse files
Add calibration check to submission checker
1 parent 2b465fc commit e04531a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tools/submission/submission_checker.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ def __init__(
877877
ignore_uncommited=False,
878878
skip_power_check=False,
879879
skip_all_systems_with_results=False,
880+
skip_calibration_check=False
880881
):
881882
self.base = MODEL_CONFIG.get(version)
882883
self.extra_model_benchmark_map = extra_model_benchmark_map
@@ -896,6 +897,7 @@ def __init__(
896897
self.ignore_uncommited = ignore_uncommited
897898
self.skip_power_check = skip_power_check
898899
self.skip_all_systems_with_results = skip_all_systems_with_results
900+
self.skip_calibration_check = skip_calibration_check
899901

900902
def set_type(self, submission_type):
901903
if submission_type == "datacenter":
@@ -1092,6 +1094,11 @@ def get_args():
10921094
action="store_true",
10931095
help="skips the check that all the systems in the systems and measurements folder should have results",
10941096
)
1097+
parser.add_argument(
1098+
"--skip-calibration-check",
1099+
action="store_true",
1100+
help="skips the check that the calibration documentation should exist",
1101+
)
10951102
parser.add_argument(
10961103
"--scenarios-to-skip",
10971104
help="Delimited list input of scenarios to skip. i.e. if you only have Offline results, pass in 'Server'",
@@ -2229,6 +2236,20 @@ def log_result(
22292236
)
22302237
results[os.path.join(results_path)] = None
22312238

2239+
# Check for calibration documentation
2240+
if not config.skip_calibration_check and division not in ["open"]:
2241+
calibration_path_root = os.path.join(division, submitter, "calibration.md")
2242+
calibration_path_doc = os.path.join(division, submitter, "documentation", "calibration.md")
2243+
if not (os.path.exists(calibration_path_root)) and (not os.path.exists(calibration_path_doc)):
2244+
log.error(
2245+
"%s/%s: has not calibration file. One of %s or %s is required",
2246+
division,
2247+
submitter,
2248+
calibration_path_root,
2249+
calibration_path_doc
2250+
)
2251+
results[os.path.join(results_path)] = None
2252+
22322253
for system_desc in list_dir(results_path):
22332254
# we are looking at
22342255
# ./$division/$submitter/results/$system_desc, ie
@@ -3173,7 +3194,8 @@ def main():
31733194
args.extra_model_benchmark_map,
31743195
ignore_uncommited=args.submission_exceptions,
31753196
skip_power_check=args.skip_power_check,
3176-
skip_all_systems_with_results = args.skip_all_systems_have_results_check
3197+
skip_all_systems_with_results = args.skip_all_systems_have_results_check,
3198+
skip_calibration_check = args.skip_calibration_check
31773199
)
31783200

31793201
if args.scenarios_to_skip:

0 commit comments

Comments
 (0)