-
Notifications
You must be signed in to change notification settings - Fork 766
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
the more cells in jupyter notebook, the more file to analyze in pylance #5748
Comments
Not sure what you mean by "more files to analyze". Can you share your log as described under "Filing an issue" in the troubleshooting guide? Thanks! |
With the increase of cells, even if I just run very simple code in the cell, such as the “Print” , the number of files to be analyzed in the lower left corner will continue to increase, and the analysis of time is getting longer and longer. .As a result, my running code in Jupyter became very slow, and even Pylance would fail.
|
I see, the behavior you're seeing is related to #5173. The |
@swg168 please put your log output into a foldable section (so it's more reader-friendly), like this:
Thanks a lot. Here's how it should look like: foldable sectionlog details here |
As I have run into similar issues with the stable release, please find below the log by just opening a large notebook. Pylance even crashed right away (this has not happened with the pre-release though, nor with the versions installed in the Insiders) Below the log and the book I used. Best penguins_classification.ipynb.zip EDIT: Forgot to add... this might be also causing the notebooks to slow down the larger they become, even causing issues with the IntelliSense/auto-completions. These both issues have been recorded in these two issues: microsoft/vscode-jupyter#14459 and microsoft/vscode#210528 |
Hi, Just for not leaving any stone unturned, I have tried to do it with these settings and a different notebook: {
"python.analysis.logLevel": "Trace",
"python.analysis.indexing": false,
"python.analysis.typeCheckingMode": "off",
"python.analysis.enablePytestSupport": false,
"python.analysis.inlayHints.pytestParameters": false,
"python.analysis.inlayHints.callArgumentNames": "off",
"python.analysis.inlayHints.functionReturnTypes": false,
"python.analysis.inlayHints.variableTypes": false,
"python.analysis.autoImportCompletions": false,
"python.analysis.useLibraryCodeForTypes": false,
"python.analysis.diagnosticMode": "openFilesOnly",
} And Pylance still crashed... see the log below. Best |
@ale-dg your issue should be this one: Your notebook is just pulling in so much we run out of memory. As a workaround, you could apply the suggested fix as described in the bug (or update to our latest prerelease as we've made some adjustments to the amount of memory we allocate). I don't believe your issue is the same as the original poster in this isuse, where 'files to analyze' is incorrectly identified. |
@rchiodo thanks for the quick answer. I'll use the prerelease then within insiders, although I must mention that I also saw a similar window as the screenshot above saying "125 files to be analysed", hence I thought it might be similar. |
Sorry I removed waiting for user response, but Stella is actually waiting for @swg168 to provide a repro for the crash mentioned, not for the files to analyze count being off. |
internally, each cell is treated as a file, that implementation detail might be leaking out in status bar. we might want to change the wording to |
Why does Pylance have to reanalyze cells that were not changed? Is it too eager to ignore the cache of previously analyzed cells? |
unlike regular python files, cells implicitly depend on each other. for example, if you have one could argue that then, we only need to re-analyze cells after one that has changed, but that is not true since there are some stuff that will be impacted by changes in depending cells such as if one has |
if you think you are having perf problem, I think best way for us to take a look is you sharing this to us (https://github.com/microsoft/pylance-release/wiki/Collecting-data-for-an-investigation.#collecting-cpuprofiles) |
This issue has been closed automatically because it needs more information and has not had recent activity. If the issue still persists, please reopen with the information requested. Thanks. |
Environment data
Code Snippet
Repro Steps
3.the more cells in jupyter notebook, the more files to analyze in pylance
Expected behavior
I don't understand why I just run the same simple code in every cell, the files of pylance to analyze will be increased. I expect it will be 1, because I just run the "print".
Actual behavior
In fact , the number of files is close to the number of cells.
Logs
The text was updated successfully, but these errors were encountered: