Unverified Commit 4d8f2e59 authored by Benjamin Lefaudeux's avatar Benjamin Lefaudeux Committed by GitHub
Browse files

[fix][Pipe] fallback for Pipe tests on internal pytorch numbering (#216)

* fallback on internal pytorch numbering
parent 835ecb0c
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment