Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/192811
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (1 Unrelated Failure), 1 Unclassified FailureAs of commit a9ef75b with merge base eb99a65 ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
The test all_gather_objects a local class (unpicklable) and asserts an error. The exception type changed: <=3.13 raised AttributeError, but 3.14 (CPython pytorchgh-139806) raises PicklingError from pickle.whichmodule() for '<locals>' names. PicklingError is a PickleError, not an AttributeError, so the stale assertRaises(AttributeError) no longer matches. Fix the assertion to (AttributeError, pickle.PickleError), correct across all supported versions (python_min_version = 3.10) while staying tight. The fix belongs in the test, not production: normalizing pickle's exception type in _object_to_tensor would mask a legitimate CPython change. Test Plan: on Python 3.14.4, assertRaises(AttributeError) around pickle.Pickler().dump() of a local class ERRORS with PicklingError, while assertRaises((AttributeError, pickle.PickleError)) PASSES; on 3.10-3.13 the real AttributeError is also matched (issubclass). Full test needs a 4-GPU nccl world: `pytest torch/testing/_internal/distributed/distributed_test.py -k test_gather_object` Authored with the assistance of an AI coding assistant.
b1c8bf8 to
a9ef75b
Compare
|
|
|
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 2 checks: periodic-rocm-mi300 / linux-noble-rocm-py3.12-mi300 / test (distributed, 2, 3, linux.rocm.gpu.mi300.4, module:rocm, oncall:distributed), periodic-rocm-mi200 / linux-jammy-rocm-py3.10-mi200 / test (distributed, 3, 3, linux.rocm.gpu.mi210.2, module:rocm, oncall:distributed) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ch#192811) ## Summary `test_gather_object` / `test_gather_object_subgroup` fail on Python 3.14. The test calls `all_gather_object` on a **local class** (unpicklable) and asserts an error. The exception type changed: **<=3.13** raised `AttributeError`, but **3.14** ([CPython pytorchgh-139806](python/cpython#139806)) raises `PicklingError` eagerly from `pickle.whichmodule()` for `'<locals>'` names. `PicklingError` is a `PickleError`, not an `AttributeError`, so the stale `assertRaises(AttributeError)` no longer matches. ## Fix Assert on the types raised across all supported versions (`python_min_version = 3.10`): ```python with self.assertRaises((AttributeError, pickle.PickleError)): dist.all_gather_object(...) ``` ## Test plan On Python 3.14.4, assertRaises(AttributeError) around pickle.Pickler().dump() of a local class ERRORS with PicklingError, while assertRaises((AttributeError, pickle.PickleError)) PASSES; on 3.10-3.13 the real AttributeError is also matched (issubclass). Full test needs a 4-GPU nccl world: `python -m pytest torch/testing/_internal/distributed/distributed_test.py -k test_gather_object -v` Pull Request resolved: pytorch#192811 Approved by: https://github.com/jeffdaily (cherry picked from commit 6b296c0)
Fix test_gather_object assertion for Python 3.14 PicklingError (pytorch#192811) ## Summary: The test all_gather_objects a local class (unpicklable) and asserts an error. The exception type changed: <=3.13 raised AttributeError, but 3.14 (CPython pytorchgh-139806) raises PicklingError from pickle.whichmodule() for '<locals>' names. PicklingError is a PickleError, not an AttributeError, so the stale assertRaises(AttributeError) no longer matches. Fix the assertion to (AttributeError, pickle.PickleError), correct across all supported versions (python_min_version = 3.10) while staying tight. The fix belongs in the test, not production: normalizing pickle's exception type in _object_to_tensor would mask a legitimate CPython change. ## Test plan: Test Plan: on Python 3.14.4, assertRaises(AttributeError) around pickle.Pickler().dump() of a local class ERRORS with PicklingError, while assertRaises((AttributeError, pickle.PickleError)) PASSES; on 3.10-3.13 the real AttributeError is also matched (issubclass). Full test needs a 4-GPU nccl world: `pytest torch/testing/_internal/distributed/distributed_test.py -k test_gather_object` Authored with the assistance of an AI coding assistant. Cherry-pick upstream pytorch#192811
…ch#192811) ## Summary `test_gather_object` / `test_gather_object_subgroup` fail on Python 3.14. The test calls `all_gather_object` on a **local class** (unpicklable) and asserts an error. The exception type changed: **<=3.13** raised `AttributeError`, but **3.14** ([CPython pytorchgh-139806](python/cpython#139806)) raises `PicklingError` eagerly from `pickle.whichmodule()` for `'<locals>'` names. `PicklingError` is a `PickleError`, not an `AttributeError`, so the stale `assertRaises(AttributeError)` no longer matches. ## Fix Assert on the types raised across all supported versions (`python_min_version = 3.10`): ```python with self.assertRaises((AttributeError, pickle.PickleError)): dist.all_gather_object(...) ``` ## Test plan On Python 3.14.4, assertRaises(AttributeError) around pickle.Pickler().dump() of a local class ERRORS with PicklingError, while assertRaises((AttributeError, pickle.PickleError)) PASSES; on 3.10-3.13 the real AttributeError is also matched (issubclass). Full test needs a 4-GPU nccl world: `python -m pytest torch/testing/_internal/distributed/distributed_test.py -k test_gather_object -v` Pull Request resolved: pytorch#192811 Approved by: https://github.com/jeffdaily
Summary
test_gather_object/test_gather_object_subgroupfail on Python 3.14. The test callsall_gather_objecton a local class (unpicklable) and asserts an error. The exception type changed: <=3.13 raisedAttributeError, but 3.14 (CPython gh-139806) raisesPicklingErroreagerly frompickle.whichmodule()for'<locals>'names.PicklingErroris aPickleError, not anAttributeError, so the staleassertRaises(AttributeError)no longer matches.Fix
Assert on the types raised across all supported versions (
python_min_version = 3.10):Test plan
On Python 3.14.4, assertRaises(AttributeError) around pickle.Pickler().dump() of a local class ERRORS with PicklingError, while assertRaises((AttributeError, pickle.PickleError)) PASSES; on 3.10-3.13 the real AttributeError is also matched (issubclass). Full test needs a 4-GPU nccl world:
python -m pytest torch/testing/_internal/distributed/distributed_test.py -k test_gather_object -v