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
7b5a1e7d
Unverified
Commit
7b5a1e7d
authored
Jun 15, 2020
by
Funtowicz Morgan
Committed by
GitHub
Jun 15, 2020
Browse files
Fix importing transformers on Windows (#4997)
parent
a9f1fc6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/transformers/benchmark/benchmark_utils.py
src/transformers/benchmark/benchmark_utils.py
+6
-1
No files found.
src/transformers/benchmark/benchmark_utils.py
View file @
7b5a1e7d
...
@@ -16,7 +16,6 @@ from collections import defaultdict, namedtuple
...
@@ -16,7 +16,6 @@ from collections import defaultdict, namedtuple
from
datetime
import
datetime
from
datetime
import
datetime
from
multiprocessing
import
Pipe
,
Process
from
multiprocessing
import
Pipe
,
Process
from
multiprocessing.connection
import
Connection
from
multiprocessing.connection
import
Connection
from
signal
import
SIGKILL
from
typing
import
Callable
,
Iterable
,
List
,
NamedTuple
,
Optional
,
Union
from
typing
import
Callable
,
Iterable
,
List
,
NamedTuple
,
Optional
,
Union
from
transformers
import
AutoConfig
,
PretrainedConfig
from
transformers
import
AutoConfig
,
PretrainedConfig
...
@@ -33,6 +32,12 @@ if is_tf_available():
...
@@ -33,6 +32,12 @@ if is_tf_available():
from
tensorflow.python.eager
import
context
as
tf_context
from
tensorflow.python.eager
import
context
as
tf_context
if
platform
.
system
()
==
"Windows"
:
from
signal
import
CTRL_C_EVENT
as
SIGKILL
else
:
from
signal
import
SIGKILL
logger
=
logging
.
getLogger
(
__name__
)
# pylint: disable=invalid-name
logger
=
logging
.
getLogger
(
__name__
)
# pylint: disable=invalid-name
...
...
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