Skip to content

Propagating KeyboardInterrupt in render_vis #33

@TomFrederik

Description

@TomFrederik

Currently, when one executes
for i in range(num_channels): _ = render.render_vis(model, objective.channels(layer_name, i))

and then interrupts, e.g. by hitting the stop button in Colab, then it will simply stop the current optimization and then continue to loop. This is annoying for interactive programming. I suggest re-raising the KeyboradInterrupt after catching it with the except. This way the code is still stopped when interrupting from keyboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions