Parse the GPU name from the 'GPU: ...' line in logs.txt.
(folder: Path)
| 88 | |
| 89 | |
| 90 | def _read_gpu_name_from_logs(folder: Path) -> str | None: |
| 91 | """Parse the GPU name from the 'GPU: ...' line in logs.txt.""" |
| 92 | logs = folder / "logs.txt" |
| 93 | if not logs.exists(): |
| 94 | return None |
| 95 | for line in logs.read_text().splitlines(): |
| 96 | m = re.match(r"^GPU:\s*(.+)$", line) |
| 97 | if m: |
| 98 | return m.group(1).strip() |
| 99 | return None |
| 100 | |
| 101 | |
| 102 | def plot_batch_scaling(bdf_long: pd.DataFrame): |