Unverified Commit 948ab03e authored by ℍ𝕠𝕝𝕝𝕠𝕨 𝕄𝕒𝕟's avatar ℍ𝕠𝕝𝕝𝕠𝕨 𝕄𝕒𝕟 Committed by GitHub
Browse files

[Bugfix][V1] Avoid importing PreTrainedModel (#15366)


Signed-off-by: default avatarHollow Man <hollowman@opensuse.org>
parent 5797fb97
......@@ -32,7 +32,7 @@ def set_default_torch_dtype(dtype: torch.dtype):
def is_transformers_impl_compatible(
arch: str,
module: Optional[transformers.PreTrainedModel] = None) -> bool:
module: Optional["transformers.PreTrainedModel"] = None) -> bool:
mod = module or getattr(transformers, arch, None)
if mod is None:
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment