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
fairscale
Commits
4d8f2e59
Unverified
Commit
4d8f2e59
authored
Nov 30, 2020
by
Benjamin Lefaudeux
Committed by
GitHub
Nov 30, 2020
Browse files
[fix][Pipe] fallback for Pipe tests on internal pytorch numbering (#216)
* fallback on internal pytorch numbering
parent
835ecb0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tests/nn/pipe_process/test_pipe.py
tests/nn/pipe_process/test_pipe.py
+12
-0
No files found.
tests/nn/pipe_process/test_pipe.py
View file @
4d8f2e59
...
@@ -375,6 +375,18 @@ def checkpoint_eval(pipeline_style):
...
@@ -375,6 +375,18 @@ def checkpoint_eval(pipeline_style):
def
torch_version
()
->
Tuple
[
int
,
...]:
def
torch_version
()
->
Tuple
[
int
,
...]:
result
=
version
.
parse
(
torch
.
__version__
).
release
result
=
version
.
parse
(
torch
.
__version__
).
release
# Catch torch version if run against internal pre-releases, like `1.8.0a0fb`,
# for which version.parse().release will return None (version becomes of LegacyVersion type)
if
result
is
None
:
# Two options here:
# - either skip this version,
# - or check that Pipe is not broken by this ongoing development.
# Assuming that we're interested in the second usecase more than the first,
# return the pre-release or dev numbering
numbering
=
torch
.
__version__
.
split
(
"."
)
result
=
(
int
(
numbering
[
0
]),
int
(
numbering
[
1
]),
0
)
assert
result
assert
result
return
result
return
result
...
...
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