Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
f92cc703
Unverified
Commit
f92cc703
authored
Aug 21, 2023
by
Sylvain Gugger
Committed by
GitHub
Aug 21, 2023
Browse files
Ignore all exceptions from signal in dynamic code (#25623)
parent
1982dd3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/dynamic_module_utils.py
src/transformers/dynamic_module_utils.py
+1
-1
No files found.
src/transformers/dynamic_module_utils.py
View file @
f92cc703
...
@@ -603,7 +603,7 @@ def resolve_trust_remote_code(trust_remote_code, model_name, has_local_code, has
...
@@ -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"
,
""
]:
elif
answer
.
lower
()
in
[
"no"
,
"n"
,
"0"
,
""
]:
trust_remote_code
=
False
trust_remote_code
=
False
signal
.
alarm
(
0
)
signal
.
alarm
(
0
)
except
AttributeError
:
except
Exception
:
# OS which does not support signal.SIGALRM
# OS which does not support signal.SIGALRM
raise
ValueError
(
raise
ValueError
(
"Loading this model requires you to execute execute some code in that repo on your local machine. "
"Loading this model requires you to execute execute some code in that repo on your local machine. "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment