Skip to content
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

delayed execution in notebooks #15743

Closed
amunger opened this issue Jun 4, 2024 · 6 comments
Closed

delayed execution in notebooks #15743

amunger opened this issue Jun 4, 2024 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster perf Performance issues

Comments

@amunger
Copy link
Contributor

amunger commented Jun 4, 2024

Originally posted by @arman258 in microsoft/vscode#214040 (comment)

coming from microsoft/vscode#211154, I think copilot has something to do with this issue. Take a look at the videos below; I just started working on another .ipynb file, not even 2 cells with about 20-30 lines of codes, the slowness started. You can clearly see the copilot trying to do something and lagging the jupyter to show the output.

I also face the same issue with another AI code completion called Codeium. The behavior is the same. Disabling them seems to handle the jupyter files better, but as the file starts to get complicated, it gets slow again.

ms-toolsai.jupyter-unresponsive.cpuprofile.txt

image

2024-06-04.15-05-36.mp4
2024-06-04.15-09-52.mp4
@amunger amunger transferred this issue from microsoft/vscode Jun 4, 2024
@amunger
Copy link
Contributor Author

amunger commented Jun 4, 2024

@arman258 - Does the delay go away if you disable the copilot extension? From what I can see in the log output, jupyter is receiving the execution request fairly quickly and takes a fairly long time to complete it.

@arman258
Copy link

arman258 commented Jun 4, 2024

@amunger - Yes, it does. In fact, I'm working on the same notebook without a Copilot and, so far, haven't seen any delay. Note that once the delay starts, Pylance syntax highlighting is not working either (gray color) - the video doesn't show this behavior, but I experienced this with every notebook with Copilot enabled.

I haven't figured out what causes this; sometimes, without doing much, the delay starts. Sometimes, after a few hours of heavy use. It's very inconsistent. The only solution is to reload vscode. It's been like this for at least a month or so. None of the release and pre-release versions of copilot have fixed this issue.

@amunger amunger added the perf Performance issues label Jun 5, 2024
@amunger
Copy link
Contributor Author

amunger commented Jun 5, 2024

Can you provide the trace logs from jupyter:

  1. set "jupyter.logging.level": "trace"
  2. reload vs code
  3. when the notebook starts to act sluggish, run Jupyter: Show Output and paste the content of that window here, or attach a file.

@amunger amunger self-assigned this Jun 5, 2024
@amunger amunger added the info-needed Issue requires more information from poster label Jun 5, 2024
@arman258
Copy link

arman258 commented Jun 5, 2024

I will test it. But there doesn't seem to be a trace level for Jupyter logging; the maximum it goes is verbose, which I assume is the same.
Value is not accepted. Valid values: "off", "error", "warn", "info", "debug", "verbose".(1)

But setting it to verbose still shows the [debug] level in the Jupyter output. I even set Developer: Set Log Level: Trace, but it still showed [debug]. If this is fine, I will share the logs as soon as the notebook start to act up.

10:56:41.737 [info] Handle Execution of Cells 2 for ~\Box\AoPP_~\TNC-JTG\fleet_update2.ipynb
10:56:41.738 [debug] Cell Index:2 sent to kernel
10:56:41.743 [debug] Start cell 2 execution @ 1717606601743 (clear output)
10:56:41.743 [debug] Kernel acknowledged execution of cell 2 @ 1717606601743
10:56:41.873 [info] Cell 2 completed in 0.129s (start: 1717606601743, end: 1717606601872)
10:56:41.873 [debug] Cell 2 executed successfully

@amunger
Copy link
Contributor Author

amunger commented Jun 6, 2024

ah sorry, the value is being switched to trace in the new version to align better with vscode, so it should change once you update to the version that was just released yesterday. But either way, it should have the logs that we're looking for.

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster perf Performance issues
Projects
None yet
Development

No branches or pull requests

4 participants