@@ -84,8 +84,13 @@ def results_to_json(latency, throughput, serving):
8484 # this result is generated via `benchmark_serving.py`
8585
8686 # attach the benchmarking command to raw_result
87- with open (test_file .with_suffix (".commands" )) as f :
88- command = json .loads (f .read ())
87+ try :
88+ with open (test_file .with_suffix (".commands" )) as f :
89+ command = json .loads (f .read ())
90+ except OSError as e :
91+ print (e )
92+ continue
93+
8994 raw_result .update (command )
9095
9196 # update the test name of this result
@@ -99,8 +104,13 @@ def results_to_json(latency, throughput, serving):
99104 # this result is generated via `benchmark_latency.py`
100105
101106 # attach the benchmarking command to raw_result
102- with open (test_file .with_suffix (".commands" )) as f :
103- command = json .loads (f .read ())
107+ try :
108+ with open (test_file .with_suffix (".commands" )) as f :
109+ command = json .loads (f .read ())
110+ except OSError as e :
111+ print (e )
112+ continue
113+
104114 raw_result .update (command )
105115
106116 # update the test name of this result
@@ -121,8 +131,13 @@ def results_to_json(latency, throughput, serving):
121131 # this result is generated via `benchmark_throughput.py`
122132
123133 # attach the benchmarking command to raw_result
124- with open (test_file .with_suffix (".commands" )) as f :
125- command = json .loads (f .read ())
134+ try :
135+ with open (test_file .with_suffix (".commands" )) as f :
136+ command = json .loads (f .read ())
137+ except OSError as e :
138+ print (e )
139+ continue
140+
126141 raw_result .update (command )
127142
128143 # update the test name of this result
0 commit comments