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

Use Dask instead of multiprocessing module #530

Closed
wants to merge 8 commits into from

Conversation

andrii-i
Copy link
Collaborator

@andrii-i andrii-i commented Jun 21, 2024

Use Dask instead of multiprocessing module

@andrii-i andrii-i added the enhancement New feature or request label Jun 21, 2024
@andrii-i andrii-i force-pushed the dask branch 6 times, most recently from 027c090 to ece6ccc Compare June 21, 2024 23:56
@andrii-i
Copy link
Collaborator Author

Kicking CI

@andrii-i andrii-i closed this Jun 22, 2024
@andrii-i andrii-i reopened this Jun 22, 2024
@andrii-i andrii-i force-pushed the dask branch 3 times, most recently from 12993c1 to d753850 Compare June 25, 2024 01:40
@andrii-i andrii-i marked this pull request as ready for review June 25, 2024 15:54
Copy link
Collaborator

@JasonWeill JasonWeill left a comment

Choose a reason for hiding this comment

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

Generally looking good, just a couple of small non-blocking comments.

conftest.py Outdated Show resolved Hide resolved
"""
Placeholder method for a cleanup code to run when the server is stopping.
"""
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to keep this method if it does nothing?

Copy link
Collaborator Author

@andrii-i andrii-i Jun 26, 2024

Choose a reason for hiding this comment

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

Yes. BaseScheduler is a base class / klass for schedulers, essentially an interface for all schedulers instantiated and used by SchedulerApp. BaseScheduler.stop_extension creates a placeholder for scheduler cleanup / stop_extension logic that is called from SchedulerApp.stop_extension.
SchedulerApp.stop_extension is a public method inherited from ExtensionApp called by Jupyter Server when the server is stopping.

I implemented stop_extension in default Scheduler in Scheduler.stop_extension to correctly terminate Dask and avoid JupyterLab process not shutting down immediately on interrupt as for example we've seen in Jupyter AI.

@andrii-i andrii-i force-pushed the dask branch 4 times, most recently from 993f725 to 258c373 Compare June 29, 2024 00:56
@andrii-i
Copy link
Collaborator Author

Superseded by #553

@andrii-i andrii-i closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants