Spaces:
Sleeping
Sleeping
Small fixes and data update
Browse files- bar_plot.py +18 -10
- h100_data.json +2 -2
- mi325_data.json +2 -2
bar_plot.py
CHANGED
|
@@ -72,7 +72,7 @@ def create_matplotlib_bar_plot() -> None:
|
|
| 72 |
|
| 73 |
# Create figure with dark theme - maximum size for full screen
|
| 74 |
plt.style.use('dark_background')
|
| 75 |
-
fig, axs = plt.subplots(2, 1, figsize=(
|
| 76 |
fig.patch.set_facecolor('#000000')
|
| 77 |
|
| 78 |
# Load data and ensure coherence
|
|
@@ -103,7 +103,7 @@ def create_matplotlib_bar_plot() -> None:
|
|
| 103 |
"Time to first token and inter-token latency (lower is better)",
|
| 104 |
f"Batch size: {batch_size}, sequence length: {sequence_length}, new tokens: {num_tokens_to_generate}",
|
| 105 |
])
|
| 106 |
-
fig.suptitle(title, color='white', fontsize=20, y=1.005)
|
| 107 |
plt.tight_layout()
|
| 108 |
|
| 109 |
# Add common legend with full text
|
|
@@ -135,9 +135,16 @@ def create_matplotlib_bar_plot() -> None:
|
|
| 135 |
return html
|
| 136 |
|
| 137 |
|
| 138 |
-
def draw_bar_plot(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
ax.set_facecolor('#000000')
|
| 140 |
-
ax.grid(True, alpha=0.
|
| 141 |
# Draw bars
|
| 142 |
_ = ax.bar(**bar_kwargs, width=1.0, edgecolor='white', linewidth=1, zorder=3)
|
| 143 |
# Add error bars
|
|
@@ -151,9 +158,10 @@ def draw_bar_plot(ax: plt.Axes, bar_kwargs: dict, errors: list, ylabel: str, xti
|
|
| 151 |
ax.tick_params(colors='white', labelsize=13)
|
| 152 |
ax.set_xticks([xt[0] for xt in xticks], [xt[1] for xt in xticks], fontsize=16)
|
| 153 |
# Truncate axis to better fit the bars
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
| 72 |
|
| 73 |
# Create figure with dark theme - maximum size for full screen
|
| 74 |
plt.style.use('dark_background')
|
| 75 |
+
fig, axs = plt.subplots(2, 1, figsize=(20, 11), sharex=True) # used to be 30, 16
|
| 76 |
fig.patch.set_facecolor('#000000')
|
| 77 |
|
| 78 |
# Load data and ensure coherence
|
|
|
|
| 103 |
"Time to first token and inter-token latency (lower is better)",
|
| 104 |
f"Batch size: {batch_size}, sequence length: {sequence_length}, new tokens: {num_tokens_to_generate}",
|
| 105 |
])
|
| 106 |
+
fig.suptitle(title, color='white', fontsize=20, y=1.005, linespacing=1.5)
|
| 107 |
plt.tight_layout()
|
| 108 |
|
| 109 |
# Add common legend with full text
|
|
|
|
| 135 |
return html
|
| 136 |
|
| 137 |
|
| 138 |
+
def draw_bar_plot(
|
| 139 |
+
ax: plt.Axes,
|
| 140 |
+
bar_kwargs: dict,
|
| 141 |
+
errors: list,
|
| 142 |
+
ylabel: str,
|
| 143 |
+
xticks: list[tuple[float, str]],
|
| 144 |
+
adapt_ylim: bool = False,
|
| 145 |
+
) -> None:
|
| 146 |
ax.set_facecolor('#000000')
|
| 147 |
+
ax.grid(True, alpha=0.3, color='white', axis='y', zorder=0)
|
| 148 |
# Draw bars
|
| 149 |
_ = ax.bar(**bar_kwargs, width=1.0, edgecolor='white', linewidth=1, zorder=3)
|
| 150 |
# Add error bars
|
|
|
|
| 158 |
ax.tick_params(colors='white', labelsize=13)
|
| 159 |
ax.set_xticks([xt[0] for xt in xticks], [xt[1] for xt in xticks], fontsize=16)
|
| 160 |
# Truncate axis to better fit the bars
|
| 161 |
+
if adapt_ylim:
|
| 162 |
+
new_ymin, new_ymax = 1e9, -1e9
|
| 163 |
+
for h, e in zip(bar_kwargs["height"], errors):
|
| 164 |
+
new_ymin = min(new_ymin, 0.98 * (h - e))
|
| 165 |
+
new_ymax = max(new_ymax, 1.02 * (h + e))
|
| 166 |
+
ymin, ymax = ax.get_ylim()
|
| 167 |
+
ax.set_ylim(max(ymin, new_ymin), min(ymax, new_ymax))
|
h100_data.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f843d3f436d7919f67c071824fde3bc247b7e3a096a92d8abb191988d86a9d2
|
| 3 |
+
size 2627476
|
mi325_data.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:628d50b1cbd1eca36f26d3e2c3e31d3062996ffbeb203f3c7ee04b604fec039e
|
| 3 |
+
size 2674620
|