jupyter-scheduler icon indicating copy to clipboard operation
jupyter-scheduler copied to clipboard

Manage the culling of Jupyter Server with scheduled jobs to support JupyterHub

Open thomasLeclaire opened this issue 1 year ago • 7 comments

Problem

In the context of JupyterHub, we should have some way to bypass the culling if some notebook are currently scheduled on the jupyterserver of an user.

Proposed solution

no real ideas :-(

thomasLeclaire avatar Nov 28 '24 09:11 thomasLeclaire

Hi @thomasLeclaire. Thank you for creating this issue. Could you please elaborate on the problem providing a more detailed description of the problem and reproduction path?

andrii-i avatar Nov 29 '24 23:11 andrii-i

@andrii-i -- If I'm not wrong, the requirement is that JupyterHub has a feature to cull Jupyterlab servers upon no user activity (ref: service-to-cull-idle-servers. However any jobs scheduled using 'jupyter-scheduler' probably is not considered as an actvity by Jupyterlab server and consequently JupyterHub will cull the jupyterlab server thinking that the jupyterlab server is idle (doing nothing).

Can there be enhancements done to 'jupyter-scheduler' to let the jupyterlab server somehow detect the jobs being scheduled as an 'activity' and ultimately not getting itself culled by JupyterHub? However, if no jobs are scheduled, I think this can be considered as a 'no activity'.

sunayansaikia avatar Dec 01 '24 03:12 sunayansaikia

Thank you for the details.

andrii-i avatar Dec 04 '24 19:12 andrii-i

Potentially related changes on the server (not released yet) https://github.com/jupyter-server/jupyter_server/pull/1429

andrii-i avatar Dec 17 '24 17:12 andrii-i

Ran into the same need - I have an idea of how this can be done - happy to submit a PR!

mimikwang avatar Apr 02 '25 04:04 mimikwang

@mimikwang please feel free to open a PR, it would be much appreciated

andrii-i avatar Apr 02 '25 06:04 andrii-i

@andrii-i FYI I've submitted a PR for this

mimikwang avatar Apr 13 '25 19:04 mimikwang