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
fe140464
Unverified
Commit
fe140464
authored
Jun 30, 2022
by
Yih-Dar
Committed by
GitHub
Jun 30, 2022
Browse files
skip some ipex tests until it works with torch 1.12 (#17964)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
91e1f24e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
tests/trainer/test_trainer.py
tests/trainer/test_trainer.py
+3
-0
No files found.
tests/trainer/test_trainer.py
View file @
fe140464
...
@@ -642,6 +642,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
...
@@ -642,6 +642,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
train_output
=
trainer
.
train
()
train_output
=
trainer
.
train
()
self
.
assertEqual
(
train_output
.
global_step
,
10
)
self
.
assertEqual
(
train_output
.
global_step
,
10
)
@
unittest
.
skip
(
reason
=
"skip temporarily until intel_extension_for_pytorch works with torch 1.12"
)
@
require_torch_bf16_cpu
@
require_torch_bf16_cpu
@
require_intel_extension_for_pytorch
@
require_intel_extension_for_pytorch
def
test_number_of_steps_in_training_with_ipex
(
self
):
def
test_number_of_steps_in_training_with_ipex
(
self
):
...
@@ -886,6 +887,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
...
@@ -886,6 +887,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
expected_acc
=
AlmostAccuracy
()((
pred
+
1
,
y
))[
"accuracy"
]
expected_acc
=
AlmostAccuracy
()((
pred
+
1
,
y
))[
"accuracy"
]
self
.
assertAlmostEqual
(
results
[
"eval_accuracy"
],
expected_acc
)
self
.
assertAlmostEqual
(
results
[
"eval_accuracy"
],
expected_acc
)
@
unittest
.
skip
(
reason
=
"skip temporarily until intel_extension_for_pytorch works with torch 1.12"
)
@
require_torch_bf16_cpu
@
require_torch_bf16_cpu
@
require_intel_extension_for_pytorch
@
require_intel_extension_for_pytorch
def
test_evaluate_with_ipex
(
self
):
def
test_evaluate_with_ipex
(
self
):
...
@@ -1006,6 +1008,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
...
@@ -1006,6 +1008,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
self
.
assertTrue
(
np
.
array_equal
(
labels
[
0
],
trainer
.
eval_dataset
.
ys
[
0
]))
self
.
assertTrue
(
np
.
array_equal
(
labels
[
0
],
trainer
.
eval_dataset
.
ys
[
0
]))
self
.
assertTrue
(
np
.
array_equal
(
labels
[
1
],
trainer
.
eval_dataset
.
ys
[
1
]))
self
.
assertTrue
(
np
.
array_equal
(
labels
[
1
],
trainer
.
eval_dataset
.
ys
[
1
]))
@
unittest
.
skip
(
reason
=
"skip temporarily until intel_extension_for_pytorch works with torch 1.12"
)
@
require_torch_bf16_cpu
@
require_torch_bf16_cpu
@
require_intel_extension_for_pytorch
@
require_intel_extension_for_pytorch
def
test_predict_with_ipex
(
self
):
def
test_predict_with_ipex
(
self
):
...
...
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