Skip to content

Commit fd4c288

Browse files
authored
Place a system metadata stamp on readme chart (#405)
1 parent 789cead commit fd4c288

File tree

4 files changed

+423
-409
lines changed

4 files changed

+423
-409
lines changed

benchmarks/decoders/benchmark_decoders_library.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,11 @@ def retrieve_videos(urls_and_dest_paths):
444444
urllib.request.urlretrieve(url, path)
445445

446446

447-
def plot_data(df_data, plot_path):
447+
def plot_data(json_data, plot_path):
448448
plt.rcParams["font.size"] = 18
449449

450450
# Creating the DataFrame
451-
df = pd.DataFrame(df_data)
451+
df = pd.DataFrame(json_data["experiments"])
452452

453453
# Sorting by video, type, and frame_count
454454
df_sorted = df.sort_values(by=["video", "type", "frame_count"])
@@ -518,6 +518,14 @@ def plot_data(df_data, plot_path):
518518
for col in range(video_type_combinations[unique_videos[row]], max_combinations):
519519
fig.delaxes(axes[row, col])
520520

521+
plt.gcf().text(
522+
0.005,
523+
0.87,
524+
"\n".join([f"{k}: {v}" for k, v in json_data["system_metadata"].items()]),
525+
fontsize=11,
526+
bbox=dict(facecolor="white"),
527+
)
528+
521529
# Adjust layout to avoid overlap
522530
plt.tight_layout()
523531

12.9 KB
Loading

0 commit comments

Comments
 (0)