Skip to content

Add keyboard interrupt handling into cython files (particular those that run long) #9136

@amueller

Description

@amueller

At PyParis @ogrisel and me and some others thought that using cysignals to catch keyboard interrupts would be cool. Unfortunately it's LGPL. But it's not that hard to do that ourselves:

https://stackoverflow.com/questions/16769870/cython-python-and-keyboardinterrupt-ignored

We "only" need to periodically check for it.
The main use-case for this for me is that I ran some line in Jupyter and then realized i did something wrong but it takes 5h to complete. Or it runs longer than I anticipated and I want to stop it earlier.
Right now I think I need to kill the kernel, but that might even still have the process running in the background eating ram and CPU, I'm not sure.

For me this was mostly an issue with liblinear and libsvm so far. Not sure where else.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions