Closed ejguan closed 2 years ago
Corresponding CI failure on TorchText repo
Smoke test failure: https://app.circleci.com/pipelines/github/pytorch/text/5246/workflows/40ecc516-0f48-47e4-8f5b-fb5417701699/jobs/176575
The final link command looks strange, it looks as if the variable name _torchtet
is missing.
And setup tools is not picking up _torchtext
I expect setuptools to fail at this point, but it somehow did not fail.
However it is more strange that this only happens on 3.7. It seems to be happening on Conda as well.
Maybe the last warning is the answer.
C:\tools\miniconda3\envs\env3.7\lib\site-packages\wheel\bdist_wheel.py:87: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
sys.version_info < (3, 8))) \
CI could be building 3.8 extension with Python 3.7?
Not an expert on this topic. But looking at the build log, it seems _torchtext.pyd
somehow changed to pyd
.
See:
The OUT
is build\lib.win-amd64-3.7\torchtext\pyd
And copying build\lib.win-amd64-3.7\torchtext\pyd -> build\bdist.win-amd64\wheel\.\torchtext
The extension name is processed by PyTorch's CppExtension
at the moment, so it could be something on PyTorch core side.
https://github.com/pytorch/text/blob/main/build_tools/setup_helpers/extension.py#L168
However, CppExtension
is a wrapper around setuptools
. So the peculiarity of failing only on Windows 3.7 could be happening there, in which case there aren't much thing torchtext can fix. Also @Nayef211 is migrating the build system to CMake, so it might not be relevant for a long time. I'd wait to see what happens tomorrow, unless you are making changes that is sensitive to OS. (In that case, I do not have a suggestion for the next step.)
Yeah I don't believe we've made any changes to torchtext's build system recently to warrant this failure so I also suspect it might be related to a change coming from PyTorch. The revamped build system using CMake is almost ready in https://github.com/pytorch/text/pull/1673. We're just waiting to resolve all Windows build failures before we land.
Note: I am working on the branch from @Nayef211 's cmake build. I am observing the similar phenomenon but the CI job is failing properly.
error: can't copy 'build\lib.win-amd64-3.7\pyd': doesn't exist or not a regular file
@Nayef211 I think this can be closed now.
🐛 Bug
Describe the bug
See the CI on TorchData https://github.com/pytorch/data/runs/6011121045?check_suite_focus=true
We installed TorchText with version
torchtext-0.13.0.dev20220413
for Python 3.7 on Windows. The test failure is:ModuleNotFoundError: No module named 'torchtext._torchtext'
To Reproduce Steps to reproduce the behavior:
Add a test for nightly release?
Expected behavior
No Error as the other platforms
Environment
CI
certifi-2021.10.8 charset-normalizer-2.0.12 colorama-0.4.4 idna-3.3 numpy-1.21.6 requests-2.27.1 torch-1.12.0.dev20220413+cpu torchtext-0.13.0.dev20220413 tqdm-4.64.0 typing-extensions-4.1.1 urllib3-1.26.9
Additional context Add any other context about the problem here.