jupyter-scheduler
jupyter-scheduler copied to clipboard
Failed jobs are shown as completed when `%%time` cell magic is used
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:
But the HTML/Notebook output clearly shows that an exception was raised:
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
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?
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.
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:
Adjusted the title accordingly.