[Bugfix] Fix failing test from annotation failure#176887
[Bugfix] Fix failing test from annotation failure#176887Lucaskabela wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176887
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit d4361dd with merge base 92a9070 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@Lucaskabela has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95802783. |
| # | ||
| # This source code is licensed under the BSD-style license found in the | ||
| # LICENSE file in the root directory of this source tree. | ||
| from __future__ import annotations |
There was a problem hiding this comment.
There is a Ruff rule we can use to prevent this kind of failure. I'll enable it.
There was a problem hiding this comment.
Okay, weird. How was this causing a failure before? It shouldn't be on 3.10 or newer?
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
c6291e3 to
39028f6
Compare
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
39028f6 to
285d52a
Compare
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
285d52a to
1625b28
Compare
Summary: Pull Request resolved: pytorch#176887 See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
1625b28 to
8ec8581
Compare
|
@Lucaskabela Do you have an exact failure? I suspect the issue is related to different parsing of annotations which we should really replace with inspect.get_annotations, typing_extensions.get_type_hints etc... That would make it work fine in either case? |
Yeah the error is like agent_results: mp.Queue | None = None, # (role, agent_result)
~~~~~~~~~^~~~~~
TypeError: unsupported operand type(s) for |: 'method' and 'NoneType'Worth noting the failure only happens on internal jobs so this is an easy enough fix to land as is imo |
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Differential Revision: D95802783
8ec8581 to
2f22337
Compare
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
Okay, yeah this is exposing some bugs with our handling of To be consistent all the way through 3.14 we should use. inspect.get_annotations(obj, eval_str=False)or better yet for consistent performance across all Python versions: from typing_extensions import get_annotations, Format
get_annotations(obj, format=Format.FORWARDREF) |
Merge failedReason: 2 mandatory check(s) failed. The first few are:
Dig deeper by viewing the failures on hud |
|
@pytorchmergebot merge -i |
Merge failedReason: 12 jobs have failed, first few of them are: pull / linux-jammy-py3.14-clang15 / test (crossref, 2, 2, lf.linux.2xlarge), pull / linux-jammy-py3.14-clang15 / test (default, 2, 5, lf.linux.4xlarge), pull / linux-jammy-py3.10-clang15 / test (crossref, 2, 2, lf.linux.2xlarge), pull / linux-jammy-py3.14t-clang15 / test (crossref, 2, 2, lf.linux.2xlarge), pull / linux-jammy-py3.14t-clang15 / test (default, 5, 5, lf.linux.4xlarge) Details for Dev Infra teamRaised by workflow job |
2f22337 to
63babb1
Compare
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Reviewed By: aorenste Differential Revision: D95802783
Summary: See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Reviewed By: aorenste Differential Revision: D95802783
63babb1 to
426a4f5
Compare
Summary: Pull Request resolved: pytorch#176887 See title Test Plan: ``` buck test fbcode//mode/opt fbcode//caffe2/test/distributed/elastic/agent/server/test:local_agent_test -- --run-disabled ``` Reviewed By: aorenste Differential Revision: D95802783
426a4f5 to
d4361dd
Compare
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: See title
Test Plan:
Differential Revision: D95802783