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
OpenFold
Commits
39f9958b
Commit
39f9958b
authored
Jan 11, 2024
by
jnwei
Browse files
Change test_compare_model in deepspeed test to use mean instead of max
parent
561333f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_deepspeed_evo_attention.py
tests/test_deepspeed_evo_attention.py
+2
-2
No files found.
tests/test_deepspeed_evo_attention.py
View file @
39f9958b
...
@@ -274,7 +274,7 @@ class TestDeepSpeedKernel(unittest.TestCase):
...
@@ -274,7 +274,7 @@ class TestDeepSpeedKernel(unittest.TestCase):
Run full model with and without using DeepSpeed Evoformer attention kernel
Run full model with and without using DeepSpeed Evoformer attention kernel
and compare output coordinates.
and compare output coordinates.
"""
"""
eps
=
0.
5
eps
=
0.
2
with
open
(
"tests/test_data/sample_feats.pickle"
,
"rb"
)
as
fp
:
with
open
(
"tests/test_data/sample_feats.pickle"
,
"rb"
)
as
fp
:
batch
=
pickle
.
load
(
fp
)
batch
=
pickle
.
load
(
fp
)
...
@@ -316,7 +316,7 @@ class TestDeepSpeedKernel(unittest.TestCase):
...
@@ -316,7 +316,7 @@ class TestDeepSpeedKernel(unittest.TestCase):
out_repro
=
out_repro
[
"sm"
][
"positions"
][
-
1
].
squeeze
(
0
)
out_repro
=
out_repro
[
"sm"
][
"positions"
][
-
1
].
squeeze
(
0
)
out_repro_ds
=
out_repro_ds
[
"sm"
][
"positions"
][
-
1
].
squeeze
(
0
)
out_repro_ds
=
out_repro_ds
[
"sm"
][
"positions"
][
-
1
].
squeeze
(
0
)
err
=
torch
.
m
ax
(
torch
.
abs
(
out_repro
-
out_repro_ds
))
err
=
torch
.
m
ean
(
torch
.
abs
(
out_repro
-
out_repro_ds
))
self
.
assertTrue
(
err
<
eps
,
f
'Error:
{
err
}
'
)
self
.
assertTrue
(
err
<
eps
,
f
'Error:
{
err
}
'
)
...
...
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