-
Notifications
You must be signed in to change notification settings - Fork 102
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
Jupyterlab kernel usage #164
Jupyterlab kernel usage #164
Conversation
Tune the panel layout
…not-available Show a message is kernel usage is not available
…rnel Remove old kernel poll
Don't throw timeout exception
…nt-pooling Pool only the active kernel and if the sidebar is visible
packages/labextension/src/index.ts
Outdated
const kernel_extension: JupyterFrontEndPlugin<void> = { | ||
id: '@jupyter-server/resource-usage:kernel-panel-item', | ||
autoStart: true, | ||
requires: [ITranslator, ICommandPalette, INotebookTracker], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to keep at least ICommandPalette
as optional here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Before merging, I should probably squash (not the commits from jupyterlab-kernel-usage
of course).
Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
ca4ea5b
to
5115041
Compare
5115041
to
cf8b9cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Works well on binder - thank you!
- Translations may be improved, see inline comments; I do not have a strong opinion on whether colon should be included in translation strings.
- For translations we will also need a PR adding this extension to repository-map.yml in language-packs repo
".*$", | ||
[ | ||
( | ||
url_path_join(base_url, "jupyterlab_kernel_usage", r"get_usage/(.+)$"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to harmonise the endpoint name with the other one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like /api/metrics/kernel_usage/get_usage/{kernel_id}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like sounds good, maybe keeping the v1
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Done. |
Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
891213b
to
eb1c391
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Nice thanks both! @davidbrochart or @krassowski feel free to make a new release with this change if you would like to. The repo uses the releaser already. For the version we could bump to edit: you should have received invites for the PyPI and npm projects |
I'm seeing that when the kernel is busy executing some code (e.g. |
I think this was reported before although I could not reproduce. Might be a regression specific to a new version of ipykernel? In any case I think it's fine to merge and release. Edit: Sorry for spam, I missed invites, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
See #163 (comment).