Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capture framework version from cm_sut_info.json #451

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions script/generate-mlperf-inference-submission/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def fill_from_json(file_path, keys, sut_info):
with open(file_path, 'r') as f:
data = json.load(f)
for key in keys:
if key in data and sut_info[key] is None:
if key in data and (sut_info[key] is None or sut_info[key] == "default"):
sut_info[key] = data[key]
elif key in data and sut_info[key] != data[key]:
return -1 # error saying there is a mismatch in the value of a key
Expand Down Expand Up @@ -149,7 +149,8 @@ def generate_submission(i):
"implementation": None,
"device": None,
"framework": None,
"run_config": None
"framework_version": "default",
"run_config": "default"
} # variable to store the system meta

model_mapping_combined = {} # to store all the model mapping related to an SUT
Expand Down Expand Up @@ -209,6 +210,7 @@ def generate_submission(i):
implementation = sut_info["implementation"]
device = sut_info["device"]
framework = sut_info["framework"].replace(" ","_")
framework_version = sut_info["framework_version"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For framework_version and run_config we can take "default" as default if not given by the user.

run_config = sut_info["run_config"]
new_res = f"{system}-{implementation}-{device}-{framework}-{run_config}"
else:
Expand All @@ -234,7 +236,7 @@ def generate_submission(i):
system_meta_default['framework'] = framework + " " + framework_version
else:
print(parts)
return {'return': 1, 'error': f"The required details for generating the inference submission:\n1.system_name\n2.implementation\n3.framework\n4.run_config\nInclude a cm-sut-info.json file with the above content in {result_path}"}
return {'return': 1, 'error': f"The required details for generating the inference submission:\n1.hardware_name\n2.implementation\n3.Device\n4.framework\n5.framework_version\n6.run_config\nInclude a cm-sut-info.json or sut-info.json file with the above content in {result_path}"}

platform_prefix = inp.get('platform_prefix', '')
if platform_prefix:
Expand Down
Loading