-
Notifications
You must be signed in to change notification settings - Fork 23.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced deprecated pkg_resources.packaging with packaging module #113023
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113023
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c7f71ce with merge base fa9045a (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot 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 |
…torch#113023) Usage of `from pkg_resources import packaging` leads to a deprecation warning: ``` DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092 Replacing `pkg_resources.package` with `package` as it is now a pytorch dependency: https://github.com/pytorch/pytorch/blob/fa9045a8725214c05ae4dcec5a855820b861155e/requirements.txt#L19 Pull Request resolved: pytorch#113023 Approved by: https://github.com/Skylion007
This PR leads to a break as installing nightly pytorch does not install somehow
|
|
Forward fix in #113154. |
@vfdev-5 Can we fallback to the old import with |
@mthrok OK, let's try that as another workaround |
@vfdev-5 should we revert the PR and land it with all forward fixes when there is a workaround ? |
@vfdev-5 Nightlies have been broken already for 2 days. The forward fix is not landed yet, it may or may not fix the nightly issue. I suggest we revert this PR and then land it together with forward fixes and some domain build log demonstrating that it does not breaks the domains. |
OK, sounds good |
@pytorchbot revert -m "breaks nightlies" -c nosignal |
@pytorchbot successfully started a revert job. Check the current status here. |
@vfdev-5 your PR has been successfully reverted. |
…dule (#113023)" This reverts commit 81ea7a4. Reverted #113023 on behalf of https://github.com/atalman due to breaks nightlies ([comment](#113023 (comment)))
extra_cflags_str = listToString(extra_cflags) | ||
extra_include_paths_str = " ".join([f'-I{include}' for include in extra_include_paths]) | ||
extra_cflags_str = listToString(extra_cflags) | ||
extra_include_paths_str = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a drive-by fix of the failing test:
test/test_cpp_extensions_jit.py::TestCppExtensionJIT::test_gen_extension_h_pch
when extra_include_paths = None
. Error message:
File "/pytorch/torch/utils/cpp_extension.py", line 1595, in load_inline
_check_and_build_extension_h_precompiler_headers(extra_cflags, extra_include_paths)
File "/pytorch/torch/utils/cpp_extension.py", line 1452, in _check_and_build_extension_h_precompiler_headers
extra_include_paths_str = " ".join([f'-I{include}' for include in extra_include_paths])
TypeError: 'NoneType' object is not iterable
extra_include_paths_str = ( | ||
"" if extra_include_paths is None else " ".join([f"-I{include}" for include in extra_include_paths]) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (this looks more compact, as " ".join([])
returns an empty string)
extra_include_paths_str = ( | |
"" if extra_include_paths is None else " ".join([f"-I{include}" for include in extra_include_paths]) | |
) | |
extra_include_paths_str = " ".join( | |
[f"-I{include}" for include in extra_include_paths] if extra_include_paths else [] | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, as CI is green, let's land it as is, will submit tiny BE fixes later
required_cuda_version = '11.0' | ||
if torch.version.cuda is not None and TorchVersion(torch.version.cuda) >= required_cuda_version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO (just remove this one, perhaps in followup PR)
@pytorchbot 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 |
…torch#113023) Usage of `from pkg_resources import packaging` leads to a deprecation warning: ``` DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092 Replacing `pkg_resources.package` with `package` as it is now a pytorch dependency: https://github.com/pytorch/pytorch/blob/fa9045a8725214c05ae4dcec5a855820b861155e/requirements.txt#L19 Pull Request resolved: pytorch#113023 Approved by: https://github.com/Skylion007, https://github.com/malfet
@pytorchbot revert -m "breaks cuda ext build" -c nosignal |
@pytorchbot successfully started a revert job. Check the current status here. |
Reverting PR 113023 failedReason: Command
Details for Dev Infra teamRaised by workflow job |
…torch#113023) Usage of `from pkg_resources import packaging` leads to a deprecation warning: ``` DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092 Replacing `pkg_resources.package` with `package` as it is now a pytorch dependency: https://github.com/pytorch/pytorch/blob/fa9045a8725214c05ae4dcec5a855820b861155e/requirements.txt#L19 Pull Request resolved: pytorch#113023 Approved by: https://github.com/Skylion007
…dule (pytorch#113023)" This reverts commit 81ea7a4. Reverted pytorch#113023 on behalf of https://github.com/atalman due to breaks nightlies ([comment](pytorch#113023 (comment)))
…torch#113023) Usage of `from pkg_resources import packaging` leads to a deprecation warning: ``` DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092 Replacing `pkg_resources.package` with `package` as it is now a pytorch dependency: https://github.com/pytorch/pytorch/blob/fa9045a8725214c05ae4dcec5a855820b861155e/requirements.txt#L19 Pull Request resolved: pytorch#113023 Approved by: https://github.com/Skylion007, https://github.com/malfet
…torch#113023) Usage of `from pkg_resources import packaging` leads to a deprecation warning: ``` DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html ``` and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092 Replacing `pkg_resources.package` with `package` as it is now a pytorch dependency: https://github.com/pytorch/pytorch/blob/fa9045a8725214c05ae4dcec5a855820b861155e/requirements.txt#L19 Pull Request resolved: pytorch#113023 Approved by: https://github.com/Skylion007, https://github.com/malfet
Usage of
from pkg_resources import packaging
leads to a deprecation warning:and in strict tests where warnings are errors, this leads to CI breaks, e.g.: pytorch/vision#8092
Replacing
pkg_resources.package
withpackage
as it is now a pytorch dependency:pytorch/requirements.txt
Line 19 in fa9045a