Papermill を他の notebook から実行する方法
Published: 2020/1/8
まず、 papermill 対応の input notebook を作成する。
具体的には、parameters
タグが付与されたセルを上の方に持つ notebook を用意。
papermill api を直に叩く
https://papermill.readthedocs.io/en/latest/usage-execute.html
に書いてあるが、 execute_notebook
という関数が papermill モジュールから利用できる。
import papermill as pm
pm.execute_notebook(
'path/to/input.ipynb',
'path/to/output.ipynb',
parameters={
'some_param': 'value1',
'other_param': 'value2'
}
)