nteract / papermill

📚 Parameterize, execute, and analyze notebooks
http://papermill.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
5.96k stars 429 forks source link

Avoiding restart kernel #326

Open JosephP91 opened 5 years ago

JosephP91 commented 5 years ago

Hello everybody. I was wondering if there is a way to avoid starting a new kernel every time a notebook execution is requested.

MSeal commented 5 years ago

Since there's no server managing kernel lifecycles you'd need some extended architecture to lean against to launch and reap kernels. To plug into that architecture you'd need to register a custom engine which skips nbconvert's kernel launch step and connects directly with some target kernel that's already alive.

Generally this won't be supported in native papermill except to well established remote systems like kernel gateway (see: https://github.com/nteract/papermill/issues/303). If there's a system you'd like to have native extensions to, we're always happy to help guide how to add it to papermill or suggest how to embed custom extensions for less general use-cases.