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
0cb16386
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "8d3bb781ee2643ad1076f4cbcc6f417245671e94"
Commit
0cb16386
authored
Dec 07, 2019
by
Aymeric Augustin
Committed by
Julien Chaumond
Dec 07, 2019
Browse files
Remove pytest dependency. (#2093)
parent
2670b0d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
transformers/tests/optimization_tf_test.py
transformers/tests/optimization_tf_test.py
+4
-3
No files found.
transformers/tests/optimization_tf_test.py
View file @
0cb16386
...
@@ -3,18 +3,19 @@ from __future__ import division
...
@@ -3,18 +3,19 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
import
unittest
import
unittest
import
pytest
from
transformers
import
is_tf_available
from
transformers
import
is_tf_available
from
.utils
import
require_tf
if
is_tf_available
():
if
is_tf_available
():
import
tensorflow
as
tf
import
tensorflow
as
tf
from
tensorflow.python.eager
import
context
from
tensorflow.python.eager
import
context
from
tensorflow.python.framework
import
ops
from
tensorflow.python.framework
import
ops
from
transformers
import
(
create_optimizer
,
GradientAccumulator
)
from
transformers
import
(
create_optimizer
,
GradientAccumulator
)
else
:
pytestmark
=
pytest
.
mark
.
skip
(
"Require TensorFlow"
)
@
require_tf
class
OptimizationFTest
(
unittest
.
TestCase
):
class
OptimizationFTest
(
unittest
.
TestCase
):
def
assertListAlmostEqual
(
self
,
list1
,
list2
,
tol
):
def
assertListAlmostEqual
(
self
,
list1
,
list2
,
tol
):
self
.
assertEqual
(
len
(
list1
),
len
(
list2
))
self
.
assertEqual
(
len
(
list1
),
len
(
list2
))
...
...
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