This is exactly what I did (see OP). Still, it looks like the finalizers are not run.
On Thursday, October 13, 2016 at 3:59:49 PM UTC+2, Steven G. Johnson wrote: > > If you just close the notebook window, the process is still running (and > you can re-connect to it via the Jupyter dashboard). You need to choose > "Close and Halt" from the Jupyter file menu. >