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

:IronRestart in ipython just makes the repl disappear but not restart #259

Open
drusmanbashir opened this issue Jun 2, 2022 · 7 comments

Comments

@drusmanbashir
Copy link

drusmanbashir commented Jun 2, 2022

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

@hkupty
Copy link
Collaborator

hkupty commented Jun 3, 2022

Hi,

Thanks for the issue. I'll double-check. I think I have an idea of why is that.

@jolars
Copy link
Contributor

jolars commented Jun 21, 2022

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.

@AdrienLeGuillou
Copy link

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.

@drusmanbashir
Copy link
Author

drusmanbashir commented Jul 27, 2022

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

@jolars
Copy link
Contributor

jolars commented Aug 3, 2022

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.

@drusmanbashir
Copy link
Author

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.

@drusmanbashir
Copy link
Author

I am working on a work-around on this issue. This keymapping does the following sequence:

  1. Iron focus
  2. quit python
  3. Move to bottom window (my .py buffer)

keymap("n","",":IronFocusIquit() j", opts)

but if I add IronRepl 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants