File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 9
9
import os
10
10
import platform
11
11
from pathlib import Path
12
+ import json
12
13
13
14
import torch
14
15
@@ -106,6 +107,12 @@ def main() -> None:
106
107
default = False ,
107
108
action = argparse .BooleanOptionalAction ,
108
109
)
110
+ parser .add_argument (
111
+ "--output-json" ,
112
+ help = "Output the results to a JSON file" ,
113
+ type = str ,
114
+ default = "" ,
115
+ )
109
116
110
117
args = parser .parse_args ()
111
118
specified_decoders = set (args .decoders .split ("," ))
@@ -146,6 +153,10 @@ def main() -> None:
146
153
min_runtime_seconds = args .min_run_seconds ,
147
154
benchmark_video_creation = args .bm_video_creation ,
148
155
)
156
+ if args .output_json :
157
+ with open (args .output_json , "w" ) as f :
158
+ json .dump (results , f , indent = 2 )
159
+
149
160
data = {
150
161
"experiments" : results ,
151
162
"system_metadata" : {
You can’t perform that action at this time.
0 commit comments