Remove deprecated torchpippy dependency (Issue #3846) #3865
+50
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove deprecated torchpippy dependency
Fixes #3846
What does this PR do?
This PR addresses issue #3846 by removing the deprecated
torchpippydependency from the codebase. Thetorchpippypackage has been merged into PyTorch 2.4.0+ astorch.distributed.pipelining, making the separate package dependency obsolete.Changes Made:
Removed dependency from setup.py: Removed
torchpippy>=0.2.0fromextras["test_dev"]insetup.pysince pipeline parallelism is now available natively in PyTorch 2.4.0+Updated documentation:
examples/inference/pippy/README.mdto reflect that PyTorch 2.4.0+ is required (which includestorch.distributed.pipelining) instead of the separatetorchpippypackagetorchpippyhas been merged into PyTorchUpdated error messages:
examples/inference/pippy/t5.pyto correctly referencetorch.distributed.pipeliningand mention the PyTorch mergeUpdated docstrings:
require_pippydecorator docstring insrc/accelerate/test_utils/testing.pyto clarify that it checks for PyTorch 2.4.0+ rather than a separate packageNote: Any other files changed in this PR are related to running
make style, which automatically formats code according to the project's style guidelines (ruff formatting).Motivation:
The
torchpippyrepository has been archived and its functionality merged into PyTorch core. Maintaining a dependency on the deprecated package is unnecessary and can cause confusion for users. The codebase already usestorch.distributed.pipeliningfrom PyTorch 2.4.0+, so this change aligns the dependencies and documentation with the actual implementation.Testing:
is_pippy_available()correctly checks for PyTorch >= 2.4.0torch.distributed.pipeliningfrom PyTorch core@require_pippywill continue to work as they check for PyTorch version, not the package