Skip to content

Commit 37cb02d

Browse files
Fixes for preprocessing submission
1 parent fc4a173 commit 37cb02d

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

tools/submission/preprocess_submission.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ def clean_invalid_results(args, log_path, config, system_desc, system_json,
247247

248248
compliance_is_valid = True
249249
if is_closed_or_network:
250-
compliance_dir = change_folder_name_in_path(
251-
scenario_path, "results", "compliance")
250+
compliance_dir = scenario_path
252251
if not checker.check_compliance_dir(
253252
compliance_dir,
254253
mlperf_model,
@@ -266,8 +265,7 @@ def clean_invalid_results(args, log_path, config, system_desc, system_json,
266265
scenario_path, "results", "measurements")
267266
if scenario in [
268267
"Offline", "MultiStream"] and (not accuracy_is_valid or not perf_is_valid) or division == "open": # they can be inferred
269-
scenario_compliance_path = change_folder_name_in_path(
270-
scenario_path, "results", "compliance")
268+
scenario_compliance_path = scenario_path
271269
log.warning(
272270
f"{scenario} scenario result is invalid for {system_desc}: {model} in {division} division. Accuracy: {accuracy_is_valid}, Performance: {perf_is_valid}. Removing...")
273271
if os.path.exists(scenario_path):
@@ -278,10 +276,8 @@ def clean_invalid_results(args, log_path, config, system_desc, system_json,
278276
shutil.rmtree(scenario_compliance_path)
279277
elif division in ["closed", "network"]:
280278
model_results_path = os.path.dirname(scenario_path)
281-
model_measurements_path = change_folder_name_in_path(
282-
model_results_path, "results", "measurements")
283-
model_compliance_path = change_folder_name_in_path(
284-
model_results_path, "results", "compliance")
279+
model_measurements_path = model_results_path
280+
model_compliance_path = model_results_path
285281
model_code_path = os.path.join(
286282
change_folder_name_in_path(
287283
log_path, "results", "code"), model)
@@ -301,8 +297,7 @@ def clean_invalid_results(args, log_path, config, system_desc, system_json,
301297
f"{scenario} scenario result is invalid for {system_desc}: {model} in {division} and open divisions. Accuracy: {accuracy_is_valid}, Performance: {perf_is_valid}. Removing it...")
302298
if os.path.exists(scenario_path):
303299
shutil.rmtree(scenario_path)
304-
scenario_measurements_path = change_folder_name_in_path(
305-
scenario_path, "results", "measurements")
300+
scenario_measurements_path = scenario_path
306301
if os.path.exists(scenario_measurements_path):
307302
shutil.rmtree(scenario_measurements_path)
308303
if not os.path.exists(target_results_path):

tools/submission/submission_structure.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ The following diagram describes the submission structure
4242
│ │ │ │ │ │ │ │ │ ├── mlperf_log_detail.txt
4343
│ │ │ │ │ │ │ │ │ └── mlperf_log_summary.txt
4444
│ │ │ │ │ │ ├── measurements.json
45-
│ │ │ │ │ │ ├── mlperf.conf
46-
│ │ │ │ │ │ ├── user.conf
47-
│ │ │ │ │ │ └── accuracy
45+
│ │ │ │ │ │ ├── mlperf.conf (optional)
46+
│ │ │ │ │ │ └── user.conf
4847
│ │ │ ├── ...
4948
│ │ │ └── <system_desc_id_n>
5049
│ │ ├── systems

tools/submission/truncate_accuracy_log.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ def truncate_results_dir(filter_submitter, backup, scenarios_to_skip):
142142
continue
143143

144144
# process results
145-
required_dirs = [
146-
"results", "compliance"] if division in [
147-
"closed", "network"] else ["results"]
145+
required_dirs = ["results"]
148146
for directory in required_dirs:
149147

150148
log_path = os.path.join(division, submitter, directory)
@@ -164,10 +162,6 @@ def truncate_results_dir(filter_submitter, backup, scenarios_to_skip):
164162
name = os.path.join(
165163
log_path, system_desc, model, scenario
166164
)
167-
if directory == "compliance":
168-
name = os.path.join(
169-
log_path, system_desc, model, scenario, test
170-
)
171165

172166
hash_val = None
173167
acc_path = os.path.join(name, "accuracy")
@@ -178,7 +172,7 @@ def truncate_results_dir(filter_submitter, backup, scenarios_to_skip):
178172
acc_path, "accuracy.txt")
179173

180174
# only TEST01 has an accuracy log
181-
if directory == "compliance" and test != "TEST01":
175+
if str(test).startswith("TEST") and test != "TEST01":
182176
continue
183177
if not os.path.exists(acc_log):
184178
log.error("%s missing", acc_log)

0 commit comments

Comments
 (0)