Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify kernel while executing a Jupyter notebook using Papermill's Python client?

I am running a jupyter notebook script using Papermill's python client. While running, I want to specify the kernel. However, the script ran within the same kernel as my active python shell(through which I made the API call to papermill in order to run the notebook's script).

I tried looking in the documentation(https://papermill.readthedocs.io/en/latest/usage-execute.html#execute-via-the-python-api) but in vain.

import papermill as pm
pm.execute_notebook( 'dfnjofnei.ipynb', 'dfnjofnei_output.ipynb' )
like image 650
Aviral Srivastava Avatar asked Jan 02 '23 00:01

Aviral Srivastava


1 Answers

Not sure if this is too late now, but you can check this:

papermill {input_path} {output_path} -k {kernel_name}
like image 193
jli Avatar answered Jan 05 '23 00:01

jli