使用 Papermill 生成笔记本时如何将 Jupyter Notebook 标记为可信

How to mark Jupyter Notebook trusted when generating the notebook with Papermill

我每天都会使用 Papermill 生成一些 Jupyter Notebook 文件,这些文件会覆盖前一天的文件。每次新生成的文件都被标记为“不受信任”。我可以点击按钮让他们信任我,但每天都这样做很烦人。在使用 Papermill 生成文件时,有什么方法可以自动将这些文件设置为“受信任”?非常感谢!

尝试:

jupyter trust mynotebook.ipynb

参考官方文档:

https://jupyter-notebook.readthedocs.io/en/latest/notebook.html?highlight=trust#signing-notebooks