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

Resume outputs from an a previously executing cell upload reloading VS Code #13585

Closed
2 of 5 tasks
DonJayamanne opened this issue May 28, 2023 · 3 comments
Closed
2 of 5 tasks

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented May 28, 2023

Testing Show whether a remote kernel is busy when reconnecting after reload

Refs: #13276

Complexity: 3

Authors: @DonJayamanne

Create Issue

Create Issue


Requirements

Desktop

  • Have a python environment installed
  • Have latest VSCode Insiders installed
  • Have latest Jupyter and Python pre-release extension installed

Web

  • Have a python environment installed and setup with Jupyter on your desktop
  • Run jupyter with the following command line
    python -m jupyter notebook --no-browser --NotebookApp.allow_origin='*'
    Note the URL it generates for connecting
    See herefor more information on setting up Jupyter
  • Start insiders.vscode.dev
  • Make sure Jupyter prerelease extension is installed
  • Open a notebook and connect to the above Jupyter server via the Kernel Picker

Steps for DeskTop/Web

  • Open a notebook (or create a new Jupyter notebook using the command Create: New Jupyter Notebook)
  • Open a notebook and connect to the above Jupyter server via the Kernel Picker (Select Another Source -> Existing Jupyter Server)
  • Attempt to run a Python cell with the code print("Hello World") and verify the output is displayed
  • Save the notebook
  • Run a cell with the following code
import time
for i in range(200):
    time.sleep(1)
    print(i)
  • Run the above cell, and verify you can see some of the output starting from 1, 2...
  • Reload VS Code
  • After reloading, the notebook will be opened and the same kernel will be selected
  • A few seconds later you should see the toolbar with the icon Interrupt displayed on the top
  • Verify the Interrupt icon is dispalyed in the toolbar
  • Verify the Run All icon is NOT dispalyed in the toolbar
  • Click on the Interruptbutton and verify you can now run the previous print("Hello World") cell and it runs to completion
  • Now create a cell with the following code
import time
for i in range(300):
    time.sleep(1)
    print(i)
  • Run the above cell , and verify you can see some of the output starting from 1, 2...
  • Reload VS Code (or Exit VS Code completely & restart VS Code)
  • After reloading, the notebook will be opened and the same kernel will be selected
  • A few seconds later you should see the new output from the counter, e.g. 1.2....8,9,10,11....
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug testplan-item and removed bug Issue identified by VS Code Team member as probable bug labels May 28, 2023
@ghost ghost assigned deepak1556 and bamurtaugh May 30, 2023
@meganrogge meganrogge added this to the May 2023 milestone May 30, 2023
@deepak1556 deepak1556 removed their assignment May 30, 2023
@bamurtaugh
Copy link
Member

python -m jupyter notebook --no-browser --NotebookApp.allow_origin='*' fails for me, so I adjusted it to python -m notebook --no-browser --NotebookApp.allow_origin='*' - @DonJayamanne let me know if that's alright/expected.

@bamurtaugh
Copy link
Member

bamurtaugh commented May 30, 2023

@DonJayamanne I'm stuck when I reload insiders.vscode.dev - I can't reconnect to a kernel. I describe it here: #13602. I'm blocked at this point on further testing since I can't reconnect after reloading.

cc @rebornix since you helped me with the great steps to connect to a remote Codespaces kernel, in case I'm missing anything else.

@bamurtaugh
Copy link
Member

Thanks so much @DonJayamanne for taking the time to unblock my Jupyter setup (and @rebornix for your help earlier)! This is now working great and really cool to see.

@bamurtaugh bamurtaugh removed their assignment May 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants