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

Kernel Picker Plan #11904

Closed
52 of 54 tasks
DonJayamanne opened this issue Nov 4, 2022 · 13 comments · Fixed by #13094
Closed
52 of 54 tasks

Kernel Picker Plan #11904

DonJayamanne opened this issue Nov 4, 2022 · 13 comments · Fixed by #13094
Assignees
Labels
feature-request Request for new features or functionality notebook-kernel-picker on-testplan
Milestone

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Nov 4, 2022

TLDR

For current status of the kernel picker, please check the last video in following comments:

Prep

Existing Kernel Picker

Experimental Kernel Picker

A diagram reflecting the workflow with data models for the experimental kernel picker

image

1. Select Kernel Source

2. Changes to compute preferred controller (goal - prevent flickering of Kernel Status label)

  • (same as under Existing Kernel Picker)

3. MRU (behind a new VS Code experiment setting)

  • Proposal Kernel Picker MRU vscode#166339
  • MRU storage (Per workspace + viewtype)
    • should maintain sort order
    • keeps track of the controller id, display name, extension id
  • When VS Code loads
    • VS Code shows "Select Kernel" or "Detecting Kernels"
    • VS Code shows the selected kernel name if the controller is registered
    • Jupyter extesnion - as part of activation create the cached controllers (should be fast)
    • Should preserve sort order when loading from MRU cache
  • When users open kernel picker and MRU is not empty
    • Selected Kernel is the first one
    • Rest of items in MRU list shows right below
    • Last item in the list is "Select Another Kernel..."
  • When users open kernel picker and MRU is empty
    • Selected Kernel is the first one
    • Recommended (preferred) shows right below
  • Jupyter extension - Changes to use same setting
  • Jupyter extension - Much Faster loading of kernels from cache
    • Adopt lazy loading of Python envs without resolving python envs
    • Vnvalidate cache if a Python env is found to be invalid
    • Note: loading all controllers from cache should not delay actiavtion, only limited to controllers last used in existing notebooks
  • Do not create controllers and hide them (this causes a flicker as all controllers are visible for a fraction of a second)
  • Migration from stable kernel picker to new one (inherit selected controller)

Miscellaneous

Questions

  • How to remove items from MRU
    • Suggestion - During early dev we will not focus on adding the ability to remove an item from the MRU
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Nov 4, 2022
@rebornix rebornix added feature-request Request for new features or functionality kernel-picker and removed bug Issue identified by VS Code Team member as probable bug labels Nov 4, 2022
@rebornix rebornix added this to the November 2022 milestone Nov 4, 2022
@rebornix
Copy link
Member

rebornix commented Nov 10, 2022

Traditional kernel picker golden scenario:

Stable

Screen.Recording.2022-11-09.at.6.26.35.PM.mov

Nov 9

The kernel picker has 3 stages:

  • 🐛 Commands to install Python and Jupyter
  • Local kernel specs
  • Local kernel specs + Python environments
Video
Screen.Recording.2022-11-09.at.6.55.28.PM.mov

Nov 10

The kernel picker has 2 stages:

  • All Python environments
  • ❓ Resorted per controller affinity
Screen.Recording.2022-11-10.at.10.34.37.AM.mov

@rebornix
Copy link
Member

rebornix commented Nov 10, 2022

Experimental kernel picker golden scenario:

Nov 9

  • 🐛 Local kernels show up incrementally
  • 🐛 Python kernels show up
  • Most kernels disappear except the mostly used one
Video
Screen.Recording.2022-11-09.at.6.42.45.PM.mov

Nov 15

  • 🐛 Selected kernel not marked as selected in quick pick
Video
Screen.Recording.2022-11-15.at.10.59.12.AM.mov

Nov 16

Feedbacks we got from standup

  • Back button in the "Select Another Kernel" quick pick
  • Q: should we show the title in this quick pick?
  • 🐛 enter url for new server ui, back button, goes to the grandparent instead of parent
  • Naming "Select a Jupyter Server from Existing Jupyter Server"
  • Order: local Jupyter Kernel Spec, then Python, then Jupyter Server
    • Argument: for ipynb, kernel specs are the closet
  • 🏃 Python kernels:
  • [Codespace] should not contribute a kernel source command when using the new kernel picker
  • [Python] Create Python Environment: show a back button Create Python Environment: show a back button and ability to detect user cancellation vscode-python#20274
  • Python (ipykernel3) name doesn't include source (Codespace)
  • Group name (kind) should be lower cased in quick picks (going to leave this as Python ext & some of VS Code UI elements do the same thing)
  • Ensure local kernel specs is before Local Python Envs in list
  • 🐛 what if there are no kernel specs (we need a default empt item in the list e.g. a help link to get more information)
  • no progress indicator as soon as we add a remote (at this point we're loading remote kernel specs)
  • 🐛 Open a Python notebook with a .venv in worksapce, select some conda env A, the preferred kernel should still be .venv and selected should be A. today A is marked as recommended.

Nov 17

Screen.Recording.2022-11-17.at.9.13.30.AM.mov

Nov 21

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Nov 22, 2022

@minsa110
Copy link
Contributor

minsa110 commented Dec 2, 2022

Feedback from standup:

  • The Local kernel specs should be hidden when nothing is there
  • The Local kernel specs and the Local Python Environments options should be hidden in *.dev
  • The 'Local Python Environmentsshould be up at the top, thenLocal Kernel Specs`
  • Kernel category names should be reconsidered
    • Local Kernel Specs should be renamed to Local Jupyter Kernels for now
    • Local Python Environments should be renamed to Python Environments for now
  • Add information about kernel categories in docs @minsa110
    • Enable link to the docs via "i", i.e.:
      image
  • Need to reconsider placement of the Create Python environment command
  • The env with existing folder with workspace should always be recommended / starred
    image
    • Open q: if I used another kernel to run my notebook then reload VS Code, should the kernel default back to .venv or should it have the last run kernel selected? Maybe it still has the last run kernel selected, but still recommend the .venv

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Dec 2, 2022

Local Kernel Specs should be renamed to Jupyter Servers for now

i think we decided to call it Local Jupyter Kernels, not servers, as that's not correct
@minsa110 /cc

@minsa110
Copy link
Contributor

minsa110 commented Dec 2, 2022

Oops, yes you're right! Sorry about the confusion.

@kolibril13
Copy link

Hi, one idea from my side:
As .venv will be present in lots of local projects (e.g. because they were created with poetry), how about a list that would show the project name as well:

  • .venv (/manim/.venv)
  • .venv (/segmentation/.venv)
  • .venv (/pytutorial/.venv)

That way, it would become super easy to quickly test a notebook with kernels that come from other local projects.

@DonJayamanne
Copy link
Contributor Author

@kolibril13 thanks for your suggestion, please could you file a separate issue with your sugestions.

@kolibril13
Copy link

kolibril13 commented Dec 4, 2022

Here it is #12292

@minsa110

This comment was marked as duplicate.

@DonJayamanne

This comment was marked as duplicate.

@DonJayamanne

This comment was marked as duplicate.

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Jan 10, 2023

Jan items

Deferred (Feb)

rebornix added a commit to microsoft/vscode that referenced this issue Jan 18, 2023
rebornix added a commit to microsoft/vscode that referenced this issue Jan 18, 2023
* Re microsoft/vscode-jupyter#11904, remove detail from mru kernel picker source.

* 💄
@rebornix rebornix modified the milestones: February 2023, Backlog Feb 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook-kernel-picker on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants