Skip to content

Conversation

@ada-ggf25
Copy link

@ada-ggf25 ada-ggf25 commented Nov 29, 2025

Remove deprecated torchpippy dependency

Fixes #3846

What does this PR do?

This PR addresses issue #3846 by removing the deprecated torchpippy dependency from the codebase. The torchpippy package has been merged into PyTorch 2.4.0+ as torch.distributed.pipelining, making the separate package dependency obsolete.

Changes Made:

  1. Removed dependency from setup.py: Removed torchpippy>=0.2.0 from extras["test_dev"] in setup.py since pipeline parallelism is now available natively in PyTorch 2.4.0+

  2. Updated documentation:

    • Updated examples/inference/pippy/README.md to reflect that PyTorch 2.4.0+ is required (which includes torch.distributed.pipelining) instead of the separate torchpippy package
    • Added a note explaining that torchpippy has been merged into PyTorch
  3. Updated error messages:

    • Updated the error message in examples/inference/pippy/t5.py to correctly reference torch.distributed.pipelining and mention the PyTorch merge
  4. Updated docstrings:

    • Updated the require_pippy decorator docstring in src/accelerate/test_utils/testing.py to clarify that it checks for PyTorch 2.4.0+ rather than a separate package

Note: 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 torchpippy repository 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 uses torch.distributed.pipelining from PyTorch 2.4.0+, so this change aligns the dependencies and documentation with the actual implementation.

Testing:

  • Verified that is_pippy_available() correctly checks for PyTorch >= 2.4.0
  • Confirmed that the code uses torch.distributed.pipelining from PyTorch core
  • All existing tests that use @require_pippy will continue to work as they check for PyTorch version, not the package

Remove torchpippy>=0.2.0 from the test_dev extras dependencies list in setup.py.
This dependency is no longer required for the test development environment.
…lelism

Update the PiPPy examples README to document the migration from the
separate torchpippy package to PyTorch's built-in pipeline parallelism
(torch.distributed.pipelining) available in PyTorch 2.4.0+.

Changes include:
- Update title from 'PiPPy' to 'Pipeline Parallelism'
- Replace references to PiPPy library with PyTorch's built-in
  torch.distributed.pipelining
- Update installation instructions to require PyTorch 2.4.0+ instead
  of torchpippy>=0.2.0
- Add note explaining that torchpippy has been merged into PyTorch
  2.4.0+ and no additional package installation is needed
Update the RuntimeError message in t5.py to:
- Use the correct module name 'torch.distributed.pipelining' instead
  of 'torch.pipelining'
- Update the message to reflect that torchpippy has been merged into
  PyTorch 2.4.0+ as torch.distributed.pipelining, removing the
  outdated reference to using torchpippy separately
…pport

Update the docstring for the require_pippy decorator to reflect that it
now requires PyTorch 2.4.0+ (which includes torch.distributed.pipelining)
instead of requiring a separate pippy package installation.

The docstring now clearly states that tests are skipped when PyTorch < 2.4.0,
aligning with the migration from torchpippy to PyTorch's built-in pipeline
parallelism support.
Apply automatic code formatting changes from 'make style' command
using ruff check --fix and ruff format. This includes:

- Formatting fixes in example files (complete_cv_example.py, cv_example.py)
- Code style improvements in core accelerate modules (accelerator.py,
  optimizer.py, scheduler.py, state.py, tracking.py)
- Formatting updates in utility modules (dataclasses.py, deepspeed.py,
  megatron_lm.py, modeling.py, operations.py)
- Style fixes in test utilities (testing.py) and tests (test_tracking.py)
- Code formatting in command modules (estimate.py)

All changes are formatting-only and do not affect functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The test dependency torchpippy is merged into PyTorch and the repository is archived

1 participant