question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kernel Picker Plan

See original GitHub issue

TLDR

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

Prep

Existing Kernel Picker

  • 1. 🏃Kernel detection progress
    • 🏃Progress in kernel picker and kernel status @rebornix
    • Jupyter ext will use progress API (with new option). As soon as Jupyter ext loads, we display progress indicator and resolve upon creation of all controllers.
  • 2. 🏃 Update kernel picker items when kernels/source-actions update @rebornix vscode#165947
  • #11984
    • 💪🏾 https://github.com/microsoft/vscode-jupyter/issues/11914 (debt)
      • New Empty Python Notebook - default to active interpreter
      • New empty Notebook - Do not default until all kernels have been fetched
      • Existing TypeScript or similar Notebook - Do not default until all kernels have been fetched

Experimental Kernel Picker

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

image

1. Select Kernel Source

  • Merge updated prototype of kernel source picker @rebornix
  • 🏃 Separate local kernelspec and python envs vscode-jupyter#11927 @DonJayamanne
  • 🏃 Lazy loading in kernel spec list vscode-jupyter#11931
    • Note: Today the kernel quick pick is derived from controllers, and not from the kernel sources
  • Ensure kernel source (server name) is added as Kind property to controller
    • This is to ensure kernels in VS Code kernel list are grouped, else we could end up with two Python 3 kernels.
  • 🏃 #11928
    • #11932
    • Ensure this single controller is marked as preferred so that this controller is auto selected by VSC at the end of the operation (i.e. user shoudl not have to re-select the controller from the list to run a cell)
    • E.g. if user hits run cell and gets the quick pick and then selects a kernel, at the end of that the cell should run.
  • Kernel spec sorting in kernel list view
    • 🏃 #11992 @DonJayamanne
      • active Python env should be on top (e.g. .venv)
      • Then below that should be the rest like create env, etc
      • Discuss with Python extension and ensure the UIs are closely similar
    • Display recommended Kernel Spec in the Local Kernel specs quick pick (use the star just like Python ext)
    • Display recommended remote Kernel in the Remote Kernel quick pick (use the star just like Python ext)
  • 💪🏾 Display empty conda envs
    • Do what Python extension does (upon selecting this ensure we install Python into it)
  • IMPORTANT We must find a way to restore the controllers for users upgrading to the new version.
    E.g. assume they install the new version of the extension & we were to ship the new kernel picker.
    We need to now ensure the same controller is still available & pre-selected for the user opening an existing notebook.

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 https://github.com/microsoft/vscode/issues/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

  • Install Python appears and then disappears vscode-jupyter#11971
  • When you have .Net interactive installed, then the kernel status changes from .net to Select Kernel Source
  • Change label of Select Kernel Source
  • #11973 @DonJayamanne
  • 🏃 #11991 @DonJayamanne
  • Ensure Jupyter MRU works (select .venv, then select .venv2, reload and we only see .venv) #11972 @DonJayamanne
  • Add refresh button for kernel picker (like Python)
    • For local kernel specs, local python,
  • #11972 @DonJayamanne Currently don’t implemented, only for desktop, to be discussed. Not done as we need to store the MRu per document, and in web the only pace is worksapce storage and storing per document could be expensive (it could get large)

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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Dec 4, 2022

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

0reactions
kolibril13commented, Dec 4, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

A simple example program to illustrate kernel extraction. The ...
Download scientific diagram | A simple example program to illustrate kernel extraction. The kernel to be extracted is a block of lines between...
Read more >
A generative geometric kernel - ACM Digital Library
We present the design and implementation of a generative geometric kernel. The kernel generator is generic, type-safe, parametrized by many design-level ...
Read more >
kernel function model for planning of agricultural groundwater ...
Five kernel models are developed relating the maximum water table depth and four critical stream-aquifer interflow rates to the crop areas. The necessary...
Read more >
KGEN: A Python Tool for Automated Fortran Kernel ...
In this paper, we introduce a new Python-based open source tool, Kernel GENerator. (KGEN) that simplifies the creation of computational kernels [11].
Read more >
Guangcailun Stainless Steel Jujube Core Picker Pitter Seed ...
Arrives by Wed, Nov 30 Buy Guangcailun Stainless Steel Jujube Core Picker Pitter Seed Kernel Tool Kitchen Remover Squeeze Gadgets Cherry at Walmart.com....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found