(
results_dir: Path, imgs_dir: Path, max_concurrency: int, fmms_name: str, fmt: str = "png"
)
| 221 | color="gray", |
| 222 | style="italic", |
| 223 | ) |
| 224 | |
| 225 | fig.tight_layout() |
| 226 | out = tpots_dir / f"{model}.{fmt}" |
| 227 | fig.savefig(out, dpi=150, bbox_inches="tight") |
| 228 | plt.close(fig) |
| 229 | print(f"Saved to {out}") |
| 230 | |
| 231 | |
| 232 | # --------------------------------------------------------------------------- |
| 233 | # Per-model speedup plots (imgs/speedups/) |
| 234 | # --------------------------------------------------------------------------- |
| 235 | |
| 236 | |
| 237 | def plot_speedups( |
| 238 | results_dir: Path, imgs_dir: Path, max_concurrency: int, fmms_name: str, fmt: str = "png" |
| 239 | ): |
| 240 | speedups_dir = imgs_dir / "speedups" |
| 241 | tp = tp_from_dir(results_dir) |
| 242 | |
| 243 | for model in MODELS: |
| 244 | model_dirs = resolve_model_dirs(results_dir, model) |
| 245 | if not model_dirs: |
| 246 | continue |
| 247 | candidate_series = [] |
| 248 | for candidate_dir, candidate_name in [(FI2_DIR, FI2_NAME), (FMMS_DIR, fmms_name)]: |
| 249 | sdf = paired_speedups(model_dirs, candidate_dir, max_concurrency) |
| 250 | if not sdf.empty: |
| 251 | candidate_series.append((candidate_name, sdf)) |
| 252 | if not candidate_series: |
| 253 | continue |
| 254 | |
| 255 | speedups_dir.mkdir(parents=True, exist_ok=True) |
| 256 | fig, ax = plt.subplots(figsize=FIGSIZE) |
no test coverage detected