papermill icon indicating copy to clipboard operation
papermill copied to clipboard

How to pass parameters to the exporter?

Open sappjw opened this issue 5 years ago • 1 comments

I have c.InteractiveShell.pdb = True set in my default profile's ipython_config.py so I can more easily debug when I'm developing. But when running papermill I would like to use a different IPython profile, or at least change this setting on the command-line. Is there a preferred way to do this in papermill? This may be related to #387.

sappjw avatar Jan 03 '20 14:01 sappjw

Today it's kind of a pain afaik. You could try adding %config c.InteractiveShell.pdb = False at the top of your notebook. If that works you could also make a custom engine that passes the config this way at the start of your papermill execution before it runs the rest of the cells. Another option might be to make a different ipython kernel for debugging / non-debugging and select the kernel you want to use at that time with -k <kernel_name>.

There is this proposal which would enable the ipython kernel to take config as part of it's API contract: https://github.com/jupyter/enhancement-proposals/pull/46 in the future.

MSeal avatar Jan 06 '20 01:01 MSeal