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
e9693976
"server/text_generation_server/models/t5.py" did not exist on "0fbc69194694b60badae3bf643bc76985f69c0f4"
Unverified
Commit
e9693976
authored
Apr 08, 2021
by
msbaines
Committed by
GitHub
Apr 08, 2021
Browse files
[cleanup] nn.Pipe: deprecate Pipe when torch version >= 1.8.0 (#597)
parent
a6549be7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
fairscale/nn/pipe/pipe.py
fairscale/nn/pipe/pipe.py
+9
-0
No files found.
fairscale/nn/pipe/pipe.py
View file @
e9693976
...
...
@@ -20,6 +20,7 @@
"""The Pipe interface."""
from
collections
import
OrderedDict
from
typing
import
TYPE_CHECKING
,
Any
,
Iterable
,
List
,
Optional
,
Tuple
,
Union
,
cast
import
warnings
import
torch
from
torch
import
Tensor
,
nn
...
...
@@ -255,6 +256,14 @@ class Pipe(Module):
)
->
None
:
super
().
__init__
()
if
torch
.
__version__
.
split
(
"."
)[:
2
]
>=
[
"1"
,
"8"
]:
warnings
.
warn
(
"fairscale.nn.Pipe has been upstreamed to PyTorch as torch.distributed.pipeline.sync.Pipe. "
"It is now deprecated and will be removed in a future version of fairscale. "
"The PyTorch API has minor changes. Please see https://pytorch.org/docs/stable/pipeline.html for details."
,
DeprecationWarning
,
)
chunks
=
int
(
chunks
)
checkpoint
=
str
(
checkpoint
)
...
...
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