Skip to content

Commit 3d260f2

Browse files
authored
Fixes #184, issue with --extra_script_cmd (#185)
* Fixes #184, issue with --extra_script_cmd
1 parent d514694 commit 3d260f2

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

automation/script/module.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -273,31 +273,17 @@ def _run(self, i):
273273
# Useful to set up default flags such as the name of virtual enviroment
274274
extra_cli = os.environ.get('MLC_SCRIPT_EXTRA_CMD', '').strip()
275275
if extra_cli != '':
276-
from cmind import cli
277-
r = cli.parse(extra_cli)
276+
r = convert_args_to_dictionary(extra_cli)
278277
if r['return'] > 0:
279278
return r
280279

281-
mlc_input = r['mlc_input']
280+
mlc_input = r['args_dict']
282281

283282
utils.merge_dicts({'dict1': i,
284283
'dict2': mlc_input,
285284
'append_lists': True,
286285
'append_unique': True})
287286

288-
# Check if has extra tags as a second artifact
289-
# Example: cmr . "_python _tiny"
290-
291-
parsed_artifacts = i.get('parsed_artifacts', [])
292-
if len(parsed_artifacts) > 0:
293-
extra_tags = parsed_artifacts[0][0][0]
294-
if ' ' in extra_tags or ',' in extra_tags:
295-
# Add tags
296-
x = i.get('tags', '')
297-
if x != '':
298-
x += ','
299-
i['tags'] = x + extra_tags.replace(' ', ',')
300-
301287
# Recursion spaces needed to format log and print
302288
recursion_spaces = i.get('recursion_spaces', '')
303289
# Caching selections to avoid asking users again

script/app-mlperf-inference/customize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def postprocess(i):
239239
sut_config[model_full_name][scenario][metric] = value
240240

241241
print(
242-
f"SUT: {sut_name}, model: {model_full_name}, scenario: {scenario}, {metric} updated as {value}")
242+
f"SUT: {sut_name}, model: {model_full_name}, scenario: {scenario}, {metric} (mean value) updated as {value}")
243243
print(f"New config stored in {sut_config_path}")
244244
with open(sut_config_path, "w") as f:
245245
yaml.dump(sut_config, f)

0 commit comments

Comments
 (0)