[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-03-13 17:20:56 +00:00
parent a1b545c734
commit 994e9c287d
3 changed files with 8 additions and 4 deletions

View file

@ -133,7 +133,7 @@
"filename": "README.md", "filename": "README.md",
"hashed_secret": "a8253456364f1bfc7da7ae4a1db5b45d106317a5", "hashed_secret": "a8253456364f1bfc7da7ae4a1db5b45d106317a5",
"is_verified": false, "is_verified": false,
"line_number": 454 "line_number": 495
} }
], ],
"SLURM.md": [ "SLURM.md": [
@ -561,5 +561,5 @@
} }
] ]
}, },
"generated_at": "2026-03-02T22:46:56Z" "generated_at": "2026-03-13T17:20:46Z"
} }

View file

@ -89,7 +89,9 @@ class TeacherDistillationEnv(BaseEnv, ABC):
# Core fetch # Core fetch
# ------------------------------------------------------------------ # ------------------------------------------------------------------
def _validate_teacher_tokenizer_compatibility(self, teacher_tokenizer_name: str) -> None: def _validate_teacher_tokenizer_compatibility(
self, teacher_tokenizer_name: str
) -> None:
student_tok_name = getattr(self.tokenizer, "name_or_path", None) or "" student_tok_name = getattr(self.tokenizer, "name_or_path", None) or ""
if student_tok_name == teacher_tokenizer_name: if student_tok_name == teacher_tokenizer_name:
return return

View file

@ -88,7 +88,9 @@ def test_teacher_tokenizer_mismatch_raises(monkeypatch):
lambda *args, **kwargs: _TeacherTokenizer(), lambda *args, **kwargs: _TeacherTokenizer(),
) )
with pytest.raises(ValueError, match="Cross-tokenizer distillation is not supported"): with pytest.raises(
ValueError, match="Cross-tokenizer distillation is not supported"
):
TeacherDistillationEnv._validate_teacher_tokenizer_compatibility( TeacherDistillationEnv._validate_teacher_tokenizer_compatibility(
env, env,
teacher_tokenizer_name="teacher-model", teacher_tokenizer_name="teacher-model",