Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[add] detect and recover from kernel auto restarts#5558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
shibbas wants to merge2 commits intonteract:main
base:main
Choose a base branch
Loading
fromshibbas:kernelautorestartdetection

Conversation

@shibbas
Copy link
Contributor

@shibbasshibbas commentedJun 3, 2021
edited
Loading

Checklist

  • I have read theContributor Guide
  • I have updated the changelogs/current_changelog.md file with some information about the change that I am making the appropriate file.
  • I have validated or unit-tested the changes that I have made.
  • I have run through the TEST_PLAN.md to ensure that my change does not break anything else.

Context

This is PR for the issue mentioned at#5548
When the Jupyter option for kernel auto-restart is turned on (which it by default), then the kernel will be restarted on the server automatically. You get a "restarting" status followed by a "starting" message from the kernel. Server uses "restarting" only for auto-restart scenarios.

This PR adds a new epic to detect the successful auto-restart and nudge the kernel back into the idle state. Also raises an action that applications can use to raise notifications since the Kernel state is lost.

Only applicable to Jupyter host type.

Before

// Side note: The CSS for nteract_on_jupyter application seems to be broken in dev setup hence the weird cell layout.
After kernel auto-restart, status gets stuck in starting state and cell execution does not proceed.
kernelautorestart-before

After

After kernel auto-restart, kernel is back to Idle and cell execution can continue.
kernelautorestart-after

@todo
Copy link

todobot commentedJun 3, 2021

test can't seem to identify next on subject. For now, check before calling

// TODO: test can't seem to identify next on subject. For now, check before calling
if(kernel.channels.next){
kernel.channels.next(kernelInfoRequest());
}
}),
map(()=>


This comment was generated bytodo based on aTODO comment in7fc02ba in#5558. cc@shibbas.

@vercel
Copy link

vercelbot commentedJun 3, 2021
edited
Loading

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect:https://vercel.com/nteract/site/ATkM8NZdPXaB51a4yLx9MrX7cLCi
✅ Preview:https://site-git-fork-shibbas-kernelautorestartdetection-nteract.vercel.app

@todo
Copy link

todobot commentedJun 3, 2021

test can't seem to identify next on subject. For now, check before calling

// TODO: test can't seem to identify next on subject. For now, check before calling
if(kernel.channels.next){
kernel.channels.next(kernelInfoRequest());
}
}),
map(()=>


This comment was generated bytodo based on aTODO comment ina44dbb5 in#5558. cc@shibbas.

@shibbasshibbas changed the titledetect and recover from kernel auto restarts[add] detect and recover from kernel auto restartsJun 4, 2021
@shibbas
Copy link
ContributorAuthor

Please let me know if you need me to provide any more information.

Copy link
Member

@rgbkrkrgbkrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is great and I learned a bit more RxJS while reviewing. Thanks!

{
header:{msg_type:"status"},
content:{execution_state:"starting"}
})asSubject<any>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Heh, this works nicely for tests. 😎

/**
* Jupyter has options to automatically restart the kernel on crash for a max-retry of 5 retries.
* Monitor for the kernel to have successfully restarted (sent as a "restarting" status followed by a "starting").
* If all 5 retries fail, the kernel status is reported as "dead".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

* Monitor for the kernel to have successfully restarted (sent as a "restarting" status followed by a "starting").
* If all 5 retries fail, the kernel status is reported as "dead".
*
*@oaram {ActionObservable} action$ ActionObservable for LAUNCH_KERNEL_SUCCESSFUL action
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@oaram ->@param


returnkernel.channels.pipe(
kernelStatuses(),
pairwise(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Wow this one is new to me, very cool.

),
tap(()=>{
// to avoid getting stuck in the "starting" state, nudge kernel with kernel_info_request to bring the status to Idle.
// TODO: test can't seem to identify next on subject. For now, check before calling
Copy link
Member

@rgbkrkrgbkrkJun 21, 2021
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Since channels is a plain observable in some of the tests rather than a subject, it doesn't have.next.

@captainsafia
Copy link
Member

@rgbkrk Thanks for taking the time to review!

@shibbas Heads up that automatic releases are now enabled on the repo (see#5568 for more info). To support automated releases, please make sure that the commits in this PR adhere to the conventional commit format (seehttps://www.conventionalcommits.org/en/v1.0.0/). Once this PR is merged, a release will be triggered for the modified packages based on the commit message.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rgbkrkrgbkrkrgbkrk approved these changes

@MSealMSealAwaiting requested review from MSeal

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@shibbas@captainsafia@rgbkrk@willingc

[8]ページ先頭

©2009-2025 Movatter.jp