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

Handling code cells with execution errors #4026

Closed
wstomv opened this issue Feb 26, 2018 · 12 comments
Closed

Handling code cells with execution errors #4026

wstomv opened this issue Feb 26, 2018 · 12 comments
Labels
enhancement pkg:notebook status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@wstomv
Copy link

wstomv commented Feb 26, 2018

We use Jupyter notebooks in our education on a large scale (over the last three weeks, we processed over thirty thousand notebooks). For our (2300) students and (100) assistants it would be helpful to have two features:

  • Run all cells, proceeding even when errors occur (same as nbconvert with allow-errors option)
  • Ability to navigate to the next code cell that raised an exception

Also, the toc extension (for Table of Contents) of Jupyter Notebook is helpful in this respect, because it shows execution progress, by highlighting toc entries that have not yet been executed.

Currently, we use Jupyter Notebook (classical); so, this would be something for next year, when JupyterLab could be the preferred tool to work with notebooks.

@jasongrout
Copy link
Contributor

Thanks for the feedback!

@jasongrout jasongrout added this to the Future milestone Feb 26, 2018
@jasongrout
Copy link
Contributor

jasongrout commented Feb 26, 2018

CC @ian-r-rose, who started working on a TOC extension: #3949.

@wstomv
Copy link
Author

wstomv commented Feb 26, 2018

To add some detail, in the current Jupyter Notebook (we use 5.0), when you do **Cell > Run All **, the view immediately navigates all the way to the last cell of the notebook, and stays there even if execution gets interrupted halfway. It is very annoying that you then have to search for the cell that raised the exception.

@vidartf
Copy link
Member

vidartf commented Feb 27, 2018

Run all cells, proceeding even when errors occur (same as nbconvert with allow-errors option)

This is already in notebook (from version 5.1, jupyter/notebook#2549), and there is an issue tracking feature parity with that for lab #2412.

I'm also going to add a cross-reference to #2277 for bookkeeping, as that ties into this feature.

@vidartf
Copy link
Member

vidartf commented Feb 27, 2018

Reading the initial post again, I'm guessing there is some difference to your request from the tag based one after all. This isn't dealing with expected failures is it? This is saying that all cells should be independent of each other, so simply run all of them no matter what.

@Mahluza
Copy link

Mahluza commented Sep 3, 2018

Hi, so has this feature been created yet? The one to run all cells.

@vidartf
Copy link
Member

vidartf commented Sep 3, 2018

Xref #2412.

@jasongrout jasongrout removed this from the Future milestone Sep 5, 2018
@blink1073 blink1073 added this to the Future milestone Sep 11, 2018
@joelostblom
Copy link
Contributor

@wstomv @Mahluza

Run all cells, proceeding even when errors occur (same as nbconvert with allow-errors option)

This is possible by adding a "raises-exception" tag to the cell metadata:

{
    "tags": [
        "raises-exception"
    ]
}

It was introduced in #2412 and restored in #7020 after not working for a bit.

For ways to add a ToC to the JupyterLab notebook, see my SO answer here.

@fperez
Copy link
Contributor

fperez commented Aug 13, 2020

It seems to me that this issue is now largely handled, at least at the level of how classic did, by honoring the raises-exception tag (I just wonder if we should have called that causes-error to be a bit more generic regarding languages that don't use the term "exception").

So I wonder if it should be closed?

I only have one idea/suggestion left, but that could be a separate, purely UI/UX issue: it might work to have a stateful toggle in the "Run" menu called "Ignore all errors when running cells" for people to easily switch between the two behaviors. That would be per-session and global, so much more coarse-grained than the metadata tags, but perhaps a useful tool for many users who may want to experiment with quick runs rather than carefully annotate teaching-oriented notebooks.

@jasongrout if you think that's worth discussing but it belongs better in a separate issue I'm happy to open one :)

@jasongrout
Copy link
Contributor

I think that sounds like an excellent idea, and I think this issue is an excellent place for the discussion. I'd love to hear if @wstomv thinks this would solve their usecase better than the metadata approach.

@fperez
Copy link
Contributor

fperez commented Aug 15, 2020

Done @jasongrout, see link above! I suggest closing this one then as I think its scope is now well handled in current Lab.

@jasongrout
Copy link
Contributor

Thanks!

@jasongrout jasongrout modified the milestones: Future, Reference Aug 16, 2020
@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement pkg:notebook status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

8 participants