Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output notebook while executing #648

Open
matthias-k opened this issue Aug 17, 2017 · 7 comments
Open

Output notebook while executing #648

matthias-k opened this issue Aug 17, 2017 · 7 comments

Comments

@matthias-k
Copy link

I'm using nbconvert to execute notebooks from the command line. Some of these notebooks take a long time and I don't get any feedback on the progress (and e.g. potential convergence problems etc) unless I save some results to files in the notebook. Is there any way to e.g. e.g. write the cell and the output to the console (e.g. as markdown) while processing the notebook? This would make things a lot easier.

@Pita
Copy link

Pita commented Apr 20, 2018

Agreed!

@AlJohri
Copy link

AlJohri commented Nov 30, 2018

is there a way to force a print statement to go to the command line? I found that if I use a ProcessPoolExecutor the print statements end up the the terminal but I was hoping for a way to replicate this without a separate process

screen shot 2018-11-29 at 10 29 59 pm

@RoyalTS
Copy link

RoyalTS commented Mar 5, 2019

related to #374?

@MSeal
Copy link
Contributor

MSeal commented Mar 5, 2019

Also https://papermill.readthedocs.io/en/latest/ supports this as a wrapper to nbconvert for notebook-to-notebook transformation. I can look into pulling this functionality into the preprocessor when I get back to finishing #905 (or shortly there-after).

@laurentperrinet
Copy link

Somewhat related to #709 which suggests to save the notebook every T minutes.

Another option could be to add the possibility to save the notebook anytime a cell is executed.

@MSeal
Copy link
Contributor

MSeal commented Jun 7, 2021

Generally at this point the advice is to use papermill for notebook execution when you want periodic saves and deeper reporting on execution. It's unlikely that this will be copied over to nbconvry, and probably not worth the library duplication, as papermill was made specifically to isolate complex execution concerns and execution ability in nbconvert is left for compatibility and ease of combining with template conversions in a singular call.

@laurentperrinet
Copy link

I did have a try at papermill and it works as expected:

papermill  --request-save-on-cell-execute --progress-bar input.ipynb output.ipynb

Thanks, Laurent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants