-
Notifications
You must be signed in to change notification settings - Fork 580
Fix for dataset path with space #2183
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
base: master
Are you sure you want to change the base?
Changes from all commits
c8bdd9b
366adda
1acee38
4f723f4
c036aa3
0b2800a
ebf35c5
41334ae
c4cf027
6657bf7
ed1c718
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ | |
|
||
import numpy as np | ||
|
||
import platform | ||
|
||
os_type = platform.system() | ||
|
||
sys.path.append(os.getcwd()) | ||
|
||
dtype_map = { | ||
|
@@ -70,6 +74,8 @@ def main(): | |
|
||
args = parser.parse_args() | ||
|
||
q = '"' if os_type == 'Windows' else "'" | ||
|
||
print("Parsing arguments.") | ||
results_dir = args.results_dir | ||
compliance_dir = args.compliance_dir | ||
|
@@ -97,16 +103,14 @@ def main(): | |
# run verify accuracy | ||
verify_accuracy_command = ( | ||
"python3 " | ||
+ verify_accuracy_binary | ||
+ f"""{q}{verify_accuracy_binary}{q}""" | ||
+ " --dtype " | ||
+ args.dtype | ||
+ unixmode | ||
+ " -r " | ||
+ results_dir | ||
+ "/accuracy/mlperf_log_accuracy.json" | ||
+ f"""{q}{os.path.join(results_dir, "accuracy", "mlperf_log_accuracy.json")}{q}""" | ||
+ " -t " | ||
+ compliance_dir | ||
+ "/mlperf_log_accuracy.json | tee verify_accuracy.txt" | ||
+ f"""{q}{os.path.join(compliance_dir, "mlperf_log_accuracy.json")}{q} | tee verify_accuracy.txt""" | ||
) | ||
try: | ||
os.system(verify_accuracy_command) | ||
|
@@ -130,13 +134,11 @@ def main(): | |
) | ||
verify_performance_command = ( | ||
"python3 " | ||
+ verify_performance_binary | ||
+ f"""{q}{verify_performance_binary}{q}""" | ||
+ " -r " | ||
+ results_dir | ||
+ "/performance/run_1/mlperf_log_summary.txt" | ||
+ f"""{q}{os.path.join(results_dir, "performance", "run_1", "mlperf_log_summary.txt")}{q}""" | ||
+ " -t " | ||
+ compliance_dir | ||
+ "/mlperf_log_summary.txt | tee verify_performance.txt" | ||
+ f"""{q}{os.path.join(compliance_dir, "mlperf_log_summary.txt")}{q} | tee verify_performance.txt""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tee won't work on Windows right? |
||
) | ||
try: | ||
os.system(verify_performance_command) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ | |
import subprocess | ||
import argparse | ||
|
||
import platform | ||
|
||
os_type = platform.system() | ||
|
||
sys.path.append(os.getcwd()) | ||
|
||
|
||
|
@@ -48,6 +52,8 @@ def main(): | |
|
||
args = parser.parse_args() | ||
|
||
q = '"' if os_type == 'Windows' else "'" | ||
|
||
print("Parsing arguments.") | ||
results_dir = args.results_dir | ||
compliance_dir = args.compliance_dir | ||
|
@@ -59,13 +65,11 @@ def main(): | |
) | ||
verify_performance_command = ( | ||
"python3 " | ||
+ verify_performance_binary | ||
+ f"""{q}{verify_performance_binary}{q}""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldnt we use os.path.join here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cleaned similar code parts in 6657bf7 |
||
+ " -r " | ||
+ results_dir | ||
+ "/performance/run_1/mlperf_log_summary.txt" | ||
+ f"""{q}{os.path.join(results_dir, "performance", "run_1", "mlperf_log_summary.txt")}{q}""" | ||
+ " -t " | ||
+ compliance_dir | ||
+ "/mlperf_log_summary.txt | tee verify_performance.txt" | ||
+ f"""{q}{os.path.join(compliance_dir, "mlperf_log_summary.txt"}{q} | tee verify_performance.txt""" | ||
) | ||
try: | ||
os.system(verify_performance_command) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use " on both windows and Unix right?