We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It should be possible to add preheated kernels for executing notebook. Please check the following discussions:
nbconvert
The text was updated successfully, but these errors were encountered:
Very simple demo:
import nbformat import json from jupyter_client import MultiKernelManager from nbconvert.preprocessors import ExecutePreprocessor mkm = MultiKernelManager() mkm.start_kernel(kernel_name="python3", kernel_id="some-kernel") km = mkm.get_kernel("some-kernel") # the kernel connection file is not created print(km.get_connection_info()) nb1 = nbformat.v4.new_notebook() nb1["cells"] = [nbformat.v4.new_code_cell("a = 13")] ep = ExecutePreprocessor() ep.preprocess(nb1, km=km) print(nb1.cells)
from jupyter_client import BlockingKernelClient client = BlockingKernelClient() client.load_connection_file('./kernel-some-kernel.json') client.start_channels() print(client) client.execute_interactive("a+=1") client.execute_interactive("print(a)")
KernelManager cant accept existing running kernel. There are two ways:
KernelManager
Sorry, something went wrong.
This is fixed in Mercury V2.
We keep the active Python session in the worker. V2 ix ~ x20 faster than V1.
pplonski
No branches or pull requests
It should be possible to add preheated kernels for executing notebook. Please check the following discussions:
nbconvert
Python API jupyter/nbconvert#1802The text was updated successfully, but these errors were encountered: