Skip to content

[monarch] delete extra runtime #363

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

Open
wants to merge 2 commits into
base: gh/suo/42/base
Choose a base branch
from
Open

[monarch] delete extra runtime #363

wants to merge 2 commits into from

Conversation

suo
Copy link
Contributor

@suo suo commented Jun 27, 2025

Stack from ghstack (oldest at bottom):

Libraries should never create tokio runtimes; that should be up to the caller to manage.

Seems that we were doing this because pyo3 threads did not have the runtime context properly set. So just fix that and zap this runtime. This cuts the number of threads we spawn in the PythonActor by a lot.

Differential Revision: D77422927

NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!

Libraries should never create tokio runtimes; that should be up to the caller to manage.

Seems that we were doing this because pyo3 threads did not have the runtime context properly set. So just fix that and zap this runtime. This cuts the number of threads we spawn in the PythonActor by a lot.

Differential Revision: [D77422927](https://our.internmc.facebook.com/intern/diff/D77422927/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D77422927/)!

[ghstack-poisoned]
suo added a commit that referenced this pull request Jun 27, 2025
Libraries should never create tokio runtimes; that should be up to the caller to manage.

Seems that we were doing this because pyo3 threads did not have the runtime context properly set. So just fix that and zap this runtime. This cuts the number of threads we spawn in the PythonActor by a lot.

Differential Revision: [D77422927](https://our.internmc.facebook.com/intern/diff/D77422927/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D77422927/)!

ghstack-source-id: 293027775
Pull Request resolved: #363
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77422927

Libraries should never create tokio runtimes; that should be up to the caller to manage.

Seems that we were doing this because pyo3 threads did not have the runtime context properly set. So just fix that and zap this runtime. This cuts the number of threads we spawn in the PythonActor by a lot.

Differential Revision: [D77422927](https://our.internmc.facebook.com/intern/diff/D77422927/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D77422927/)!

[ghstack-poisoned]
suo added a commit that referenced this pull request Jun 27, 2025
Pull Request resolved: #363

Libraries should never create tokio runtimes; that should be up to the caller to manage.

Seems that we were doing this because pyo3 threads did not have the runtime context properly set. So just fix that and zap this runtime. This cuts the number of threads we spawn in the PythonActor by a lot.
ghstack-source-id: 293110124
@exported-using-ghexport

Differential Revision: [D77422927](https://our.internmc.facebook.com/intern/diff/D77422927/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D77422927/)!
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77422927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants