Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Sep 24, 2024
2 parents 7b62b53 + cf5fddc commit a2f6125
Showing 1 changed file with 44 additions and 30 deletions.
74 changes: 44 additions & 30 deletions tools/submission/submission_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@
"power_supply_details",
"disk_drives",
"disk_controllers",
"system_power_only",
]

SYSTEM_DESC_MEANINGFUL_RESPONSE_REQUIRED_FIELDS_POWER = []
Expand Down Expand Up @@ -931,6 +932,18 @@ def check_extra_files(path, target_files):
def split_path(m):
return m.replace("\\", "/").split("/")

def get_boolean(s):
if s is None:
return False
elif isinstance(s, bool):
return s
elif isinstance(s, str):
return (s.lower() == "true")
elif isinstance(s, int):
return bool(s)
else:
raise TypeError(f"Variable should be bool, string or int, got {type(s)} instead")


def find_error_in_detail_log(config, fname):
is_valid = True
Expand Down Expand Up @@ -1639,36 +1652,37 @@ def log_result(
unit = special_unit_dict.get(model_name, unit_dict)[scenario_fixed]
power_unit = power_unit_dict[scenario_fixed]

csv.write(
fmt.format(
submitter,
available,
division,
'"' + system_type + '"',
'"' + system_name + '"',
system_desc,
model_name,
mlperf_model,
scenario_fixed,
r,
acc,
system_json.get("number_of_nodes"),
'"' + system_json.get("host_processor_model_name") + '"',
system_json.get("host_processors_per_node"),
system_json.get("host_processor_core_count"),
'"' + system_json.get("accelerator_model_name") + '"',
'"' + str(system_json.get("accelerators_per_node")) + '"',
name.replace("\\", "/"),
'"' + system_json.get("framework", "") + '"',
'"' + system_json.get("operating_system", "") + '"',
'"' + notes + '"',
compliance,
errors,
config.version,
inferred,
power_metric > 0,
unit,
)
if (power_metric <= 0) or (not get_boolean(system_json.get("system_power_only"))):
csv.write(
fmt.format(
submitter,
available,
division,
'"' + system_type + '"',
'"' + system_name + '"',
system_desc,
model_name,
mlperf_model,
scenario_fixed,
r,
acc,
system_json.get("number_of_nodes"),
'"' + system_json.get("host_processor_model_name") + '"',
system_json.get("host_processors_per_node"),
system_json.get("host_processor_core_count"),
'"' + system_json.get("accelerator_model_name") + '"',
'"' + str(system_json.get("accelerators_per_node")) + '"',
name.replace("\\", "/"),
'"' + system_json.get("framework", "") + '"',
'"' + system_json.get("operating_system", "") + '"',
'"' + notes + '"',
compliance,
errors,
config.version,
inferred,
power_metric > 0,
unit,
)
)

if power_metric > 0:
Expand Down

0 comments on commit a2f6125

Please sign in to comment.