"server/text_generation_server/models/t5.py" did not exist on "0fbc69194694b60badae3bf643bc76985f69c0f4"
Unverified Commit e9693976 authored by msbaines's avatar msbaines Committed by GitHub
Browse files

[cleanup] nn.Pipe: deprecate Pipe when torch version >= 1.8.0 (#597)

parent a6549be7
......@@ -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)
......
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