jupyter-scheduler icon indicating copy to clipboard operation
jupyter-scheduler copied to clipboard

Failed jobs are shown as completed when `%%time` cell magic is used

Open DrMaphuse opened this issue 11 months ago • 3 comments

Description

When a job fails with an exception inside a %%time magic cell, jupyter-scheduler does not recognize that the job actually failed.

For example, this job is shown as completed: grafik

But the HTML/Notebook output clearly shows that an exception was raised: grafik

How to reproduce

An exception is raised in a cell with %%time cell magic.

Expected behavior

Jobs where an exception is raised should be shown as failed, even when magic commands are used.

Context

  • Operating System and version: Linux Ubuntu 20.04
  • JupyterLab version: 4.0.11
  • Jupyter Scheduler version: 2.4.0

DrMaphuse avatar Dec 06 '24 15:12 DrMaphuse

Hi @DrMaphuse. Thank you for creating this issue.

Couple of questions: is it correct that this is only seen with in-notebook cell errors? Is it always the same type of error or not really?

andrii-i avatar Dec 06 '24 18:12 andrii-i

This happens with errors raised in an upstream module that is installed in editable mode. So far it has always been the same type of error I believe, but I can dig a little further and look if there are others.

DrMaphuse avatar Dec 06 '24 18:12 DrMaphuse

I have managed to reproduce the bug, and it is actually quite simple:

When an exception is raised in a cell with %%time cell magic, the job is falsely shown as completed by the scheduler:

grafik

Adjusted the title accordingly.

DrMaphuse avatar Dec 20 '24 16:12 DrMaphuse