iron.nvim
iron.nvim copied to clipboard
:IronRestart in ipython just makes the repl disappear but not restart
Hi I have noticed this bug when doing Deep learning on the GPU. I press shortcut and the entire repl disappears. However the ipython process is not terminated. I can still see the GPU working. In the past, i.e., 2 days ago, the repl would get fully terminated and a new repl would start in its place.
Thanks
Hi,
Thanks for the issue. I'll double-check. I think I have an idea of why is that.
For me, calling :IronRestart
from another window causes the REPL window to disappear, but if I call it from the window of the repl, then it restarts as it should.
I don't know if it's the same issue or something else but with R (or radian) calling :IronRestart
I get a similar behavior where the REPL window is closed and a new REPL starts on :IronRepl
but the process for the previous R REPL is still visible in htop
and the memory is not released.
Hi @jolars, are you 100% sure it kills the original process before starting a new one? If so, I will probably add a shortkey that combines IronFocus and IronRestart as a workaround
Hm, actually it is kind of weird. If I start a REPL in one window and call :IronRestart
from another buffer (window), the window with the iron REPL is closed but there is still a buffer around that no longer responds to any commands. There is no new Iron REPL either.
For me, calling
:IronRestart
from another window causes the REPL window to disappear, but if I call it from the window of the repl, then it restarts as it should.
I can confirm that calling :IronRestart from inside the REPL does not indeed kill the existing process and free up resources. It just starts a new one. I think a workaround might be to create a shortcut that goes into the REPL, quits it, and then starts a new one. I will add the code snippet here for python when I have it.
I am working on a work-around on this issue. This keymapping does the following sequence:
- Iron focus
- quit python
- Move to bottom window (my .py buffer)
keymap("n","<M-R>",":IronFocus<CR>Iquit()<CR> <C-w>j", opts)
but if I add IronRepl<CR> at the end of this sequence, I am unable to start iron again. Currently, it does a partial job of quitting python which is not too bad either