Skip to content

Conversation

samlurye
Copy link
Contributor

@samlurye samlurye commented Oct 6, 2025

Stack from ghstack (oldest at bottom):

This diff does a few things:

  • Introduce the monarch.actor.configure public API, which just wraps monarch._rust_bindings.monarch_hyperactor.config.configure function
  • Update the behavior of global_root_client() so that the client proc/instance are re-initialized whenever the default transport changes.
    • Supporting this also required updating monarch.actor.context() to allow overriding the current value of the _context contextvar if it is called from the root client and the default transport changed. It also requires forcibly respawning the _controller_controller when this happens.
  • Make sure we pass _attach_controller_controller=True when a spawning a proc mesh from v1 HostMesh
  • Fix the v1 implementation of get_or_spawn_controller

Differential Revision: D84015780

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

…re, wire up v1 controllers

This diff does a few things:
- Introduce the `monarch.actor.configure` public API, which just wraps `monarch._rust_bindings.monarch_hyperactor.config.configure` function
- Update the behavior of `global_root_client()` so that the client proc/instance are re-initialized whenever the default transport changes.
  - Supporting this also required updating `monarch.actor.context()` to allow overriding the current value of the `_context` contextvar if it is called from the root client and the default transport changed. It also requires forcibly respawning the `_controller_controller` when this happens.
- Make sure we pass `_attach_controller_controller=True` when a spawning a proc mesh from v1 `HostMesh`
- Fix the v1 implementation of `get_or_spawn_controller`

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

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

[ghstack-poisoned]
samlurye added a commit that referenced this pull request Oct 6, 2025
…re, wire up v1 controllers

This diff does a few things:
- Introduce the `monarch.actor.configure` public API, which just wraps `monarch._rust_bindings.monarch_hyperactor.config.configure` function
- Update the behavior of `global_root_client()` so that the client proc/instance are re-initialized whenever the default transport changes.
  - Supporting this also required updating `monarch.actor.context()` to allow overriding the current value of the `_context` contextvar if it is called from the root client and the default transport changed. It also requires forcibly respawning the `_controller_controller` when this happens.
- Make sure we pass `_attach_controller_controller=True` when a spawning a proc mesh from v1 `HostMesh`
- Fix the v1 implementation of `get_or_spawn_controller`

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

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

ghstack-source-id: 314421176
Pull Request resolved: #1446
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 6, 2025
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 meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant