Skip to content

Conversation

@zdevito
Copy link
Contributor

@zdevito zdevito commented Jun 18, 2025

Stack from ghstack (oldest at bottom):

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own. The controller actor will directly send result values to Port given to it when it is ready.

fetch_shard family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing monarch.actor_mesh.send() for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

Differential Revision: D76918699

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 18, 2025
zdevito added a commit that referenced this pull request Jun 18, 2025
This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

ghstack-source-id: 291313276
Pull Request resolved: #302
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 2, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
ghstack-source-id: 293882749
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294030448

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294131269

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294136061

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294191770

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294195492

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 3, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294232721

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 4, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294258976

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.

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

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Jul 4, 2025
Pull Request resolved: #302

This replaces the "get_next_message()" polling that tensor engine client does with ActorFutures and Ports.

The major improvement is that the futures between actors and tensor engine are now the same, meaning they can be used together to wait for different actions.

This re-introduces a true controller actor that is reponsible for ensuring results are finished and that some things do not have an error before sending results to the ports.

The client is now no longer responsible for polling for anything, the workers and controller will make progress on their own.  The controller actor will directly send result values to Port given to it when it is ready.

`fetch_shard` family is now implemented by creating a Port and returning port.recv() as the future.

To unify further, the next PR will implement all the adverbs for free-standing remote functions by implementing `monarch.actor_mesh.send()` for free functions, and re-implement fetch_shard family of functions in terms of those primitives. This is possible because the controller can now route multiple results for the same seq to the result port.
ghstack-source-id: 294262335

Differential Revision: [D76918699](https://our.internmc.facebook.com/intern/diff/D76918699/)
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d702385.

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 Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants