|
26 | 26 |
|
27 | 27 | # Batch sizes to display (columns in the chart) |
28 | 28 | BATCH_SIZES = [1, 2, 5, 10, 25, 50, 100] |
29 | | - |
| 29 | +DEFAULT_BATCH_SIZE = 100 |
30 | 30 |
|
31 | 31 | def parse_criterion_results(target_dir: Path): |
32 | 32 | """ |
@@ -212,15 +212,15 @@ def generate_chart(results: dict, output_file: Path): |
212 | 212 | alpha=0.9 |
213 | 213 | ) |
214 | 214 |
|
215 | | - # Add vertical line at x=50 on all subplots |
| 215 | + # Add vertical line at the default batch size on all subplots |
216 | 216 | for ax in [ax1, ax2, ax3, ax4]: |
217 | | - ax.axvline(x=50, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1) |
| 217 | + ax.axvline(x=DEFAULT_BATCH_SIZE, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1) |
218 | 218 |
|
219 | 219 | # Add labels on the top subplots |
220 | | - ax1.text(50, ax1.get_ylim()[1] * 0.95, 'Current batch size', |
| 220 | + ax1.text(DEFAULT_BATCH_SIZE, ax1.get_ylim()[1] * 0.95, 'Default batch size', |
221 | 221 | rotation=90, verticalalignment='top', horizontalalignment='right', |
222 | 222 | fontsize=9, color='red', fontweight='bold') |
223 | | - ax2.text(50, ax2.get_ylim()[1] * 0.95, 'Current batch size', |
| 223 | + ax2.text(DEFAULT_BATCH_SIZE, ax2.get_ylim()[1] * 0.95, 'Default batch size', |
224 | 224 | rotation=90, verticalalignment='top', horizontalalignment='right', |
225 | 225 | fontsize=9, color='red', fontweight='bold') |
226 | 226 |
|
@@ -355,12 +355,12 @@ def generate_partials_chart(results: dict, output_file: Path): |
355 | 355 | alpha=0.9 |
356 | 356 | ) |
357 | 357 |
|
358 | | - # Add vertical line at x=50 on both subplots |
| 358 | + # Add vertical line at x=DEFAULT_BATCH_SIZE on both subplots |
359 | 359 | for ax in [ax1, ax2]: |
360 | | - ax.axvline(x=50, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1) |
| 360 | + ax.axvline(x=DEFAULT_BATCH_SIZE, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1) |
361 | 361 |
|
362 | 362 | # Add label on the left subplot |
363 | | - ax1.text(50, ax1.get_ylim()[1] * 0.95, 'Current batch size', |
| 363 | + ax1.text(DEFAULT_BATCH_SIZE, ax1.get_ylim()[1] * 0.95, 'Default batch size', |
364 | 364 | rotation=90, verticalalignment='top', horizontalalignment='right', |
365 | 365 | fontsize=9, color='red', fontweight='bold') |
366 | 366 |
|
|
0 commit comments