Skip to content

Commit 83b5722

Browse files
committed
Fix mypy type errors in generate_paper_figures and train_kd
1 parent 54c3799 commit 83b5722

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

analysis/generate_paper_figures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def figure_gap_scaling(output: Path) -> None:
229229

230230
# Custom x-axis
231231
ax.set_xticks(log_classes)
232-
ax.set_xticklabels(classes)
232+
ax.set_xticklabels([str(c) for c in classes])
233233
ax.set_xlim(0.7, 2.6)
234234
ax.set_ylim(0, 10)
235235

experiments/train_kd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def train_kd(config: TrainConfig, teacher_path: Path, temperature: float, alpha:
104104
# Skip if already completed
105105
if results_path.exists():
106106
log.warning("Skipping %s (already completed)", output_dir)
107-
return json.loads(results_path.read_text())
107+
result: dict = json.loads(results_path.read_text())
108+
return result
108109

109110
set_seed(config.seed)
110111
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

0 commit comments

Comments
 (0)