@@ -84,8 +84,13 @@ def results_to_json(latency, throughput, serving):
84
84
# this result is generated via `benchmark_serving.py`
85
85
86
86
# 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
+
89
94
raw_result .update (command )
90
95
91
96
# update the test name of this result
@@ -99,8 +104,13 @@ def results_to_json(latency, throughput, serving):
99
104
# this result is generated via `benchmark_latency.py`
100
105
101
106
# 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
+
104
114
raw_result .update (command )
105
115
106
116
# update the test name of this result
@@ -121,8 +131,13 @@ def results_to_json(latency, throughput, serving):
121
131
# this result is generated via `benchmark_throughput.py`
122
132
123
133
# 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
+
126
141
raw_result .update (command )
127
142
128
143
# update the test name of this result
0 commit comments