I am seeing some unstable behavior when running `p...
# general
f
I am seeing some unstable behavior when running
pants check ::
. Every now and then, mypy complains for multiple files that it cannot find torch and other packages:
Copy code
path/to/file.py:1: error: Library stubs not installed for "PIL.Image"  [import-untyped]
path/to/file.py:1: error: Cannot find implementation or library stub for module named "torch"  [import-not-found]
path/to/file.py:1: error: Cannot find implementation or library stub for module named "torch.distributed.distributed_c10d"  [import-not-found]
path/to/file.py:1: error: Cannot find implementation or library stub for module named "torch.nn"  [import-not-found]
The error always gets reported for line
1
and on multiple files at the same time. Just running
pants check ::
again makes it go away. So it’s not reproducible reliably but also not just a one-time thing. Some days happens, some days not. Has anyone seen this before?
c
f
Oh yes, the first link looks very related, thanks.
I am on mypy 1.10.1, yes.
c
hmm, I have also had some reports internally that suggest the upstream mypy fix is not working. I have not been able to debug further. Disabling the incremental cache would still be the work around.
👍 1