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
OpenDAS
ColossalAI
Commits
01ea68b2
Unverified
Commit
01ea68b2
authored
Jul 12, 2022
by
YuliangLiu0306
Committed by
GitHub
Jul 12, 2022
Browse files
[tests] remove T5 test skip decorator (#1271)
parent
de498255
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
tests/test_fx/test_pipeline/test_hf_model/test_t5.py
tests/test_fx/test_pipeline/test_hf_model/test_t5.py
+10
-2
No files found.
tests/test_fx/test_pipeline/test_hf_model/test_t5.py
View file @
01ea68b2
...
@@ -2,12 +2,20 @@ import pytest
...
@@ -2,12 +2,20 @@ import pytest
import
transformers
import
transformers
import
torch
import
torch
from
hf_utils
import
split_model_and_compare_output
from
hf_utils
import
split_model_and_compare_output
from
colossalai.fx.tracer.meta_patch
import
meta_patched_module
try
:
import
apex
@
meta_patched_module
.
register
(
apex
.
normalization
.
FusedRMSNorm
)
def
apex_fused_layernorm
(
self
,
input
):
return
torch
.
empty
(
input
.
shape
,
device
=
'meta'
)
except
ImportError
:
pass
BATCH_SIZE
=
1
BATCH_SIZE
=
1
SEQ_LENGHT
=
16
SEQ_LENGHT
=
16
@
pytest
.
mark
.
skip
(
'tracing failed'
)
def
test_t5
():
def
test_t5
():
MODEL_LIST
=
[
MODEL_LIST
=
[
transformers
.
T5Model
,
transformers
.
T5Model
,
...
@@ -15,7 +23,7 @@ def test_t5():
...
@@ -15,7 +23,7 @@ def test_t5():
transformers
.
T5EncoderModel
,
transformers
.
T5EncoderModel
,
]
]
config
=
transformers
.
T5Config
(
d_model
=
128
,
num_layers
=
2
)
config
=
transformers
.
T5Config
(
vocab_size
=
100
,
d_model
=
128
,
num_layers
=
2
)
def
data_gen
():
def
data_gen
():
input_ids
=
torch
.
zeros
((
BATCH_SIZE
,
SEQ_LENGHT
),
dtype
=
torch
.
int64
)
input_ids
=
torch
.
zeros
((
BATCH_SIZE
,
SEQ_LENGHT
),
dtype
=
torch
.
int64
)
...
...
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