-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issues when running on various open source codebases #8272
Comments
The changes increased the number of projects in mypy_primer that pyright runs on from 28 to 123. You might be interested in re-running some of your recent analyses, e.g. #8259 |
Thanks! I'll take a look at the repos you mentioned above. We may need to (at least temporarily) pass |
The crash you are seeing for scipy is already fixed in pyright's "main" branch. This was a regression that would have been avoided with your expanded mypy_primer list! |
I think earlier I was seeing that if you installed numpy, pyright from "main" would hang on scipy as well:
I'll double check that. I'll also see what can get unblocked with |
I did an initial pass over the three code bases that result in a hang. In all three cases, the problem is related to a specific method or function (all of which have high cyclomatic complexity and symbol interdependencies). I've filed separate bugs for these three issues. It looks like you've left these disabled in mypy_primer for now. We can enable them one by one as I address the underlying cause of the hangs. I also looked at the five slowest projects listed above. Of these, I'm going to leave this issue open until I've had a chance to test the CI scripts and add more parallel runners as appropriate. Once that's done, I'll close this issue and fall back on the other specific issues I filed. Thanks again for doing this! |
Thank you for looking into it! I also confirmed that scipy hangs with "main" pyright if you install numpy, so we should track that. Yup, mypy is slow on the other four projects too, it's just aiohttp that's the outlier. That sounds good, on my side I'll add cost based sharding for pyright. Do let me know if there are other things I can help with. |
I introduced a performance fix for the I filed an additional bug to track the scipy hang. With that, I'm going to close this issue. |
@hauntsaninja, I've fixed the issue that causes pyright to hang when type checking I'm still investigating the issue with BTW, I switched the CI script to use 8 shards rather than 2. This keeps the total time down to just under 7 minutes. The script seems to be doing a good job balancing the workload between shards. |
Hooray, thank you! I've enabled those projects. Good to know the cost based sharding is working reasonably. |
Yesterday I greatly expanded the set of packages in mypy_primer that pyright will run on. I encountered a few issues (using 1.1.369).
On scipy, running
pyright
crashes with the following stacktrace:I also encountered several hangs (I left pyright running for about an hour with no termination):
pyright isort
on https://github.com/pycqa/isortpyright
on https://github.com/graphql-python/graphql-corepyright
on https://github.com/python/mypyYou can find the dependencies required for each repro listed in mypy_primer/projects.py
Out of the projects that I have currently enabled pyright on, these were the five slowest projects:
You can get a basic n=1 timing using
mypy_primer --measure-project-runtimes --type-checker pyright
.You might be interested in looking at what's going on with aiohttp in particular, since mypy is many times faster on that codebase.
Let me know if the new set of mypy_primer packages works well in CI for you. If not, let's figure out how to make things better. I can add the same cost-based sharding we do for mypy or disable some of the slowest projects.
The text was updated successfully, but these errors were encountered: