fix mypi in utils/_sympy/functions.py#136339
Closed
bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/18/basefrom
Closed
fix mypi in utils/_sympy/functions.py#136339bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/18/basefrom
bobrenjc93 wants to merge 5 commits intogh/bobrenjc93/18/basefrom
Conversation
Signed-off-by: Bob Ren <bobren@fb.com> [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/136339
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (8 Unrelated Failures)As of commit 34afab4 with merge base 7755176 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Signed-off-by: Bob Ren <bobrenfb.com> Turns out older versions of python, in particular 3.8 shows errors that 3.12 doesn't. I managed to fix all the type errors except one. ``` (py38) [15:48] devvm1521:/home/bobren/local/pytorch dmypy check torch/utils/_sympy/functions.py torch/utils/_sympy/functions.py:1159:5: error: Signature of "__repr__" incompatible with supertype "Printable" [override] torch/utils/_sympy/functions.py:1159:5: note: Superclass: torch/utils/_sympy/functions.py:1159:5: note: def __str__(Printable, /) -> Any torch/utils/_sympy/functions.py:1159:5: note: Subclass: torch/utils/_sympy/functions.py:1159:5: note: def __repr__(self) -> Any ``` I don't really understand the error. I looked in both our codebase and sympy's codebase for `def __str__(Printable` and couldn't find it. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
Signed-off-by: Bob Ren <bobrenfb.com> Turns out older versions of python, in particular 3.8 shows errors that 3.12 doesn't. I managed to fix all the type errors except one. ``` (py38) [15:48] devvm1521:/home/bobren/local/pytorch dmypy check torch/utils/_sympy/functions.py torch/utils/_sympy/functions.py:1159:5: error: Signature of "__repr__" incompatible with supertype "Printable" [override] torch/utils/_sympy/functions.py:1159:5: note: Superclass: torch/utils/_sympy/functions.py:1159:5: note: def __str__(Printable, /) -> Any torch/utils/_sympy/functions.py:1159:5: note: Subclass: torch/utils/_sympy/functions.py:1159:5: note: def __repr__(self) -> Any ``` I don't really understand the error. I looked in both our codebase and sympy's codebase for `def __str__(Printable` and couldn't find it. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
Signed-off-by: Bob Ren <bobrenfb.com> Turns out older versions of python, in particular 3.8 shows errors that 3.12 doesn't. For posterity these are the steps I took to reproduce: ``` conda create -n py38 python=3.8 conda activate py38 pip install -r requirements.txt lintrunner init dmypy restart && lintrunner --all-files --take MYPY ``` cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
Signed-off-by: Bob Ren <bobrenfb.com> Turns out older versions of python, in particular 3.8 shows errors that 3.12 doesn't. For posterity these are the steps I took to reproduce: ``` conda create -n py38 python=3.8 conda activate py38 pip install -r requirements.txt lintrunner init dmypy restart && lintrunner --all-files --take MYPY ``` [ghstack-poisoned]
Skylion007
approved these changes
Sep 20, 2024
Contributor
Author
|
@pytorchbot merge |
Collaborator
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 |
Collaborator
|
FYI, I think these are issues with invalidation in dmypy cache and not related to different Python versions. |
Contributor
He specifically tried "dmypy restart" and still didn't get the errors until he switched python versions. |
zou3519
added a commit
that referenced
this pull request
Sep 25, 2024
Revert "[PT2][Inductor][Optmus] fix test_pad_mm_bf16 and reland to fix long computation kernel (#136349)" This reverts commit e184391. Revert "Fix clang-tidy warnings in torch/csrc/lazy (#134655)" This reverts commit 0287146. Revert "Remove duplicate line (#136383)" This reverts commit 0b91e7e. Revert "[TF32] Account for TF32 in `test_conv_double_backward` (#135716)" This reverts commit 29f7b8d. Revert "Fix `Vectorized<double>::next_after` SVE compilation (#136388)" This reverts commit 7936584. Revert "Upgrade pybind11 API calls for 3.13t (#136370)" This reverts commit 067d203. Revert "[AOTI][Tooling] Filter out kernels based off lowercase names (#135395)" This reverts commit 1a10751. Revert "Add decomps for max_unpool (#133146)" This reverts commit 0c936c3. Revert "add TORCH_CUDA_CPP_API for AutoNcclGroup (#130012)" This reverts commit 293fccf. Revert "Use cpython declaration of _PyWeakref_ClearRef (#136300)" This reverts commit d2455b9. Revert "fix mypi in utils/_sympy/functions.py (#136339)" This reverts commit 7f9c064. Revert "[Inductor] Fix test_profiler_mark_wrapper_call_cuda_cuda_wrapper (#136356)" This reverts commit f53a0f9. Revert "Add more distributed examples (#130427)" This reverts commit 5997354. Revert "return instead of using skipTest (#136244)" This reverts commit 29affa6. Reapply "[PT2/Profiler] Add Context Info to Torch-Compiled Regions (#132765)" This reverts commit 783c5ba. Revert "Enable torch build with SLEEF on ARM by default (#133339)" This reverts commit 4842f0f. Revert "[inductor] Relax the conditions for loop split (#135335)" This reverts commit 687e5cf. [ghstack-poisoned]
zou3519
added a commit
that referenced
this pull request
Sep 25, 2024
Revert "[PT2][Inductor][Optmus] fix test_pad_mm_bf16 and reland to fix long computation kernel (#136349)" This reverts commit e184391. Revert "Fix clang-tidy warnings in torch/csrc/lazy (#134655)" This reverts commit 0287146. Revert "Remove duplicate line (#136383)" This reverts commit 0b91e7e. Revert "[TF32] Account for TF32 in `test_conv_double_backward` (#135716)" This reverts commit 29f7b8d. Revert "Fix `Vectorized<double>::next_after` SVE compilation (#136388)" This reverts commit 7936584. Revert "Upgrade pybind11 API calls for 3.13t (#136370)" This reverts commit 067d203. Revert "[AOTI][Tooling] Filter out kernels based off lowercase names (#135395)" This reverts commit 1a10751. Revert "Add decomps for max_unpool (#133146)" This reverts commit 0c936c3. Revert "add TORCH_CUDA_CPP_API for AutoNcclGroup (#130012)" This reverts commit 293fccf. Revert "Use cpython declaration of _PyWeakref_ClearRef (#136300)" This reverts commit d2455b9. Revert "fix mypi in utils/_sympy/functions.py (#136339)" This reverts commit 7f9c064. Revert "[Inductor] Fix test_profiler_mark_wrapper_call_cuda_cuda_wrapper (#136356)" This reverts commit f53a0f9. Revert "Add more distributed examples (#130427)" This reverts commit 5997354. Revert "return instead of using skipTest (#136244)" This reverts commit 29affa6. Reapply "[PT2/Profiler] Add Context Info to Torch-Compiled Regions (#132765)" This reverts commit 783c5ba. Revert "Enable torch build with SLEEF on ARM by default (#133339)" This reverts commit 4842f0f. Revert "[inductor] Relax the conditions for loop split (#135335)" This reverts commit 687e5cf. ghstack-source-id: b0fb91e Pull Request resolved: #136668
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stack from ghstack (oldest at bottom):
Signed-off-by: Bob Ren bobren@fb.com
Turns out older versions of python, in particular 3.8 shows errors that 3.12 doesn't. For posterity these are the steps I took to reproduce:
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10