Skip to content

Conversation

@bobrenjc93
Copy link
Contributor

@bobrenjc93 bobrenjc93 commented Sep 19, 2024

Stack from ghstack (oldest at bottom):

Signed-off-by: Bob Ren [email protected]

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

Signed-off-by: Bob Ren <[email protected]>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 19, 2024

🔗 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 (image):

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.

@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Sep 19, 2024
@bobrenjc93 bobrenjc93 requested a review from aorenste September 19, 2024 22:56
@bobrenjc93 bobrenjc93 added the topic: not user facing topic category label Sep 19, 2024
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]
@bobrenjc93 bobrenjc93 marked this pull request as ready for review September 19, 2024 23:38
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]
bobrenjc93 added a commit that referenced this pull request Sep 19, 2024
Signed-off-by: Bob Ren <bobrenfb.com>

ghstack-source-id: 1d26a6b
Pull Request resolved: #136339
@bobrenjc93
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 20, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@Skylion007
Copy link
Collaborator

FYI, I think these are issues with invalidation in dmypy cache and not related to different Python versions.

@aorenste
Copy link
Contributor

FYI, I think these are issues with invalidation in dmypy cache and not related to different Python versions.

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
@github-actions github-actions bot deleted the gh/bobrenjc93/18/head branch October 21, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants