Skip to content
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

Simpler experiment names #411

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions benchmarks/decoders/benchmark_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import argparse
import importlib.resources
import os
import platform
import typing
from dataclasses import dataclass, field
from pathlib import Path

import torch

from benchmark_decoders_library import (
AbstractDecoder,
BatchParameters,
Expand Down Expand Up @@ -167,7 +170,7 @@ def main() -> None:
if entry.is_file() and entry.name.endswith(".mp4"):
video_paths.append(entry.path)

df_data = run_benchmarks(
results = run_benchmarks(
decoders_to_run,
video_paths,
num_uniform_samples,
Expand All @@ -176,7 +179,21 @@ def main() -> None:
benchmark_video_creation=args.bm_video_creation,
batch_parameters=BatchParameters(num_threads=8, batch_size=40),
)
plot_data(df_data, args.plot_path)
data = {
"experiments": results,
"system_metadata": {
"cpu_count": os.cpu_count(),
"system": platform.system(),
"machine": platform.machine(),
"python_version": str(platform.python_version()),
"cuda": (
torch.cuda.get_device_properties(0).name
if torch.cuda.is_available()
else "not available"
),
},
}
plot_data(data, args.plot_path)


if __name__ == "__main__":
Expand Down
Loading
Loading