Skip to content

Commit f9dd9b5

Browse files
authored
Simpler experiment names (#411)
1 parent 567243d commit f9dd9b5

File tree

4 files changed

+212
-164
lines changed

4 files changed

+212
-164
lines changed

benchmarks/decoders/benchmark_decoders.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
import argparse
88
import importlib.resources
99
import os
10+
import platform
1011
import typing
1112
from dataclasses import dataclass, field
1213
from pathlib import Path
1314

15+
import torch
16+
1417
from benchmark_decoders_library import (
1518
AbstractDecoder,
1619
BatchParameters,
@@ -167,7 +170,7 @@ def main() -> None:
167170
if entry.is_file() and entry.name.endswith(".mp4"):
168171
video_paths.append(entry.path)
169172

170-
df_data = run_benchmarks(
173+
results = run_benchmarks(
171174
decoders_to_run,
172175
video_paths,
173176
num_uniform_samples,
@@ -176,7 +179,21 @@ def main() -> None:
176179
benchmark_video_creation=args.bm_video_creation,
177180
batch_parameters=BatchParameters(num_threads=8, batch_size=40),
178181
)
179-
plot_data(df_data, args.plot_path)
182+
data = {
183+
"experiments": results,
184+
"system_metadata": {
185+
"cpu_count": os.cpu_count(),
186+
"system": platform.system(),
187+
"machine": platform.machine(),
188+
"python_version": str(platform.python_version()),
189+
"cuda": (
190+
torch.cuda.get_device_properties(0).name
191+
if torch.cuda.is_available()
192+
else "not available"
193+
),
194+
},
195+
}
196+
plot_data(data, args.plot_path)
180197

181198

182199
if __name__ == "__main__":

0 commit comments

Comments
 (0)