Skip to content

Conversation

Jack-Khuu
Copy link
Contributor

@Jack-Khuu Jack-Khuu commented Aug 20, 2025

Refactors

  • PolicyRouter -> Policy
  • Policy -> PolicyWorker

Pushed Mesh and Worker set up into Policy (used to be Router)

Note: Will need follow up PR's to refactor to use @allenwang28 updated Service when ready


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 20, 2025
log_stats=None,
)

async def setupWorker(self, config, guided_decoding, num_samples):
Copy link
Member

Choose a reason for hiding this comment

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

Bad Javascript developer

"MASTER_ADDR": str(get_loopback_ip()),
"MASTER_PORT": str(get_open_port()),
},
)
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, we might want to keep the worker mesh's procs distinctly separate...

The reason is because downstream, we will want something that can monitor the proc health and re-spawn it if necessary: https://github.com/meta-pytorch/forge/blob/main/src/forge/controller/service.py#L948-L977

I think having vLLM router handling this will be unnecessarily complex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will wait to tackled on top of the planned Service change

@Jack-Khuu Jack-Khuu force-pushed the refactor-policy-router branch from 4df9f8e to d4c83d3 Compare August 21, 2025 18:03
@Jack-Khuu Jack-Khuu changed the title [WIP] Push Policy Worker into Router Push Policy Worker into Router Aug 21, 2025
@Jack-Khuu Jack-Khuu requested a review from ebsmothers August 21, 2025 21:02
DNXie and others added 13 commits August 21, 2025 18:08
* make dataset configurable

* add validation loop

* update config

* fix infinite loop, current_num_tokens

* add single pass to the parameters

* add single pass to param

* fix the hang issue

* minor: update error message

* move batch_to_device to utils and add support to blockmask

* remove comment

* clean

* fix validation backward thing for pp

* remove self.model

* add max_steps for validation to avoid hang

* remove infinite
* Add reward interface, math reward, unit tests

* move test files to rl folder

* add thinking reward
* initial commit for replica

* clean up

* phase out service for service v2

* remove v2

* remove v2 from spawn

* more minor cleanups

* remove comment

* remove comment

* simplify and unify replica initialization

* address comments

* address comments

* add capacity semaphore

* f-strings

* remove redundant health set

---------

Co-authored-by: Allen Wang <[email protected]>
* Add reward interface, math reward, unit tests

* refactor rewards: merge into one file

* remove file accidentally had
… files (#69)

* initial commit for replica

* clean up

* phase out service for service v2

* remove v2

* remove v2 from spawn

* more minor cleanups

* remove comment

* remove comment

* initial commit of ServiceEndpoint

* tests work

* simplify and unify replica initialization

* stop the underlying service proc

* split out components into their own files

* address comments

* address comments

* add capacity semaphore

* rebasing changes

* fix test

* logger changes

* fix sess_id kwarg

* makes _call its own implementation

* docstring fix

* add comment on serviceinterface

---------

Co-authored-by: Allen Wang <[email protected]>
@Jack-Khuu Jack-Khuu changed the title Push Policy Worker into Router [Debugging] Push PolicyWorker into Router and leverage Services Aug 25, 2025
@Jack-Khuu
Copy link
Contributor Author

History on this PR is borked

See #70

@Jack-Khuu Jack-Khuu closed this Aug 25, 2025
@Jack-Khuu Jack-Khuu deleted the refactor-policy-router branch August 25, 2025 23:53
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.

4 participants