mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-30 17:52:35 +06:00
Ignore all exceptions from signal in dynamic code (#25623)
This commit is contained in:
parent
1982dd3b15
commit
f92cc7034a
@ -603,7 +603,7 @@ def resolve_trust_remote_code(trust_remote_code, model_name, has_local_code, has
|
||||
elif answer.lower() in ["no", "n", "0", ""]:
|
||||
trust_remote_code = False
|
||||
signal.alarm(0)
|
||||
except AttributeError:
|
||||
except Exception:
|
||||
# OS which does not support signal.SIGALRM
|
||||
raise ValueError(
|
||||
"Loading this model requires you to execute execute some code in that repo on your local machine. "
|
||||
|
Loading…
Reference in New Issue
Block a user