Execute Jupyter notebooks line by line in VS Code

Normal notebook execution is cell by cell in Jupyter notebooks in the browser. This frequently results in cells needing to be split and rejoined at various points in the dev process. VS Code allows line by line execution of code within those cells. This feels a lot like running SQL code in MS SQL Analyzer and can be a very natural way to work.

In addition VS Code gives you a nice view of the data returned from a cell or line execution with its Data Viewer.

In WSL Ubuntu to get the line by line stuff working you will need to install the Jupyter Extension and the Python extension. Once these are in place the process of getting VS Code to find your correct python environment is very straightforward.

You can find more about line by line debugging here:

https://github.com/microsoft/vscode-jupyter/wiki/Setting-Up-Run-by-Line-and-Debugging-for-Notebooks

Once the python extension is installed VS Code will find your virtual environments and you pyenv environments.

Comments

Popular posts from this blog

Using TensorFlow Serving

Text Summarisation with BERT