Skip to content

Conversation

Jack-Khuu
Copy link
Contributor

Recreation of #61, since commit history got borked


Leverage spawn_services for Policy and performs associated refactors

  • PolicyRouter -> Policy
    • Pushed Mesh and Worker set up into Policy (used to be Router).
  • Policy -> PolicyWorker

python src/forge/actors/policy.py

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 25, 2025
@Jack-Khuu
Copy link
Contributor Author

Jack-Khuu commented Aug 25, 2025

Code-wise this is pretty close to what we will be using

Debugging an issue where Policy.run_processing doesn't get called the same with spawn_service as spawn_actor

@Jack-Khuu Jack-Khuu changed the title [WIP] Leverage Services for Policy Leverage Services for Policy + Rename PolicyRouter Aug 26, 2025
@Jack-Khuu Jack-Khuu requested a review from pbontrager August 26, 2025 00:42
class Policy(PolicyInterface):
# TODO: Add dp support
policy: Actor
config: DictConfig
Copy link
Member

Choose a reason for hiding this comment

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

I don't like individual components having knowledge of our frontend config system. Can we parameterize this fully or pass in a policy specific config class?

Copy link
Contributor

@allenwang28 allenwang28 left a comment

Choose a reason for hiding this comment

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

looking good!

await router.shutdown.call()


if __name__ == "__main__":
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move the policy main into its own app? apps/vllm.py or something

I think having a standalone vLLM application will be useful for Stanford too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally let's do it in a. separate PR to unblock this one

@joecummings joecummings mentioned this pull request Aug 26, 2025
@allenwang28
Copy link
Contributor

lgtm, as long as it's running!

@Jack-Khuu Jack-Khuu merged commit 51939cf into main Aug 26, 2025
4 checks passed
@Jack-Khuu Jack-Khuu deleted the refactor-policy-router-2 branch August 26, 2025 18:30
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants