Skip to content

Commit f1bab30

Browse files
markurtzCopilot
andauthored
Update src/speculators/model.py
Co-authored-by: Copilot <[email protected]>
1 parent 9087422 commit f1bab30

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/speculators/model.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,14 @@ def attach_verifier(
351351
) # Expect subclasses to handle references if train_only
352352

353353
if add_to_config:
354-
self.config.speculators_config.verifier = VerifierConfig.from_pretrained(
355-
verifier
356-
)
354+
try:
355+
self.config.speculators_config.verifier = VerifierConfig.from_pretrained(
356+
verifier
357+
)
358+
except (OSError, ValueError, Exception) as e:
359+
raise RuntimeError(
360+
f"Failed to load verifier configuration from '{verifier}': {e}"
361+
) from e
357362

358363
return verifier
359364

0 commit comments

Comments
 (0)