Skip to content

catching SIGINT with a hook

Petr Bělohlávek requested to merge sigint into master

Additionally, KeyboardInterrupt exception is caught in the mainloop for cases when TF catches the signal first (and maybe only)

Please, @floop, take a look at it. Sometimes the hooks works as expected but sometimes the signal is processed by TF eval function and (probably after batch) a KeyboardInterrupt is raised. Good cxMNIST command for debugging: cxflow train config/fuel/cnn.yaml stream.train.batch_size:int=1024 where the config contains hook

  - hook_module: cxflow.hooks.sigint_hook
    hook_class: SigintHook

Also try stream.train.batch_size:int=10000, that's weird.

I think it does what we want it to do, but you never know.

In addition, @floop, how should we test this hook?

Merge request reports