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

Allow cancel of queued block prior to execution #2411

Open
dodger opened this issue Nov 10, 2021 · 4 comments
Open

Allow cancel of queued block prior to execution #2411

dodger opened this issue Nov 10, 2021 · 4 comments

Comments

@dodger
Copy link

dodger commented Nov 10, 2021

Is your feature request related to a problem? Please describe.

Imagine I am experimenting with some things and I have a command line call that generates stuff, and it's slow:
! generate_stuff > stuff

Now imagine I've tested this a few times and so I have another line:
! rm stuff

And then I have another code block that does something. Like...
do_stuff_with_stuff(stuff)

So, intending to click the first and third one, I brain fart and click all three. With the brain fart continuing, let's say it doesn't dawn on me that I did this until a few minutes in. So generate_stuff has been running for three or four minutes and I don't want to waste that time spent.

Colab is happily churning along with the "generate_stuff" block, and is cued up to then execute both of the other two blocks in turn. But the second block will make the third fail (because "stuff" is missing), and will also make the time spent on generate_stuff useless.

I can, of course, interrupt execution of all three in turn, but I'll have to start the WHOLE THING over.
I cannot say "wait, belay execution of number 2, I changed my mind!"

What I would like to see happen: Stop button appears immediately after click of play button, with the waiting spinner until execution started. If clicked before cell execution has started, button will remove cell from execution queue and restore play button without any spinners.

As I see it, the only other option is cancelling everything, including the one you want to keep running, to get Colab to execute the later blocks allowing them to be cancelled (if it can even be clicked that fast)

@blois
Copy link
Contributor

blois commented Nov 11, 2021

This is currently a limitation of the Jupyter protocol, see jupyter/notebook#2340 (comment) for some background.

@Y-T-G
Copy link

Y-T-G commented Nov 24, 2021

Paperspace Gradient has this feature in their own notebook interface. I wonder how they are able to do it if it is a protocol limitation.

@RavindraWiguna
Copy link

Any idea to bring attention to this issue?

@khetnhio
Copy link

This would be a very helpful feature (I came here to see if there was a way to do this in colab). Here's a work around you can use however that is somewhat inconvenient:
You can copy the contents of the cell you don't want to run, delete it and place them in a new cell. That way you still have the cells, and the deleted cells are removed from the execution queue

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

6 participants