Skip to content

Conversation

joecummings
Copy link
Member

spawn_service(
            ServiceConfig(procs_per_replica=1, with_gpus=True, num_replicas=1),
            Policy,
            config=PolicyConfig(
                worker_params=WorkerConfig(model=model),
                sampling_params=SamplingOverrides(
                    num_samples=group_size, max_tokens=16
                ),
            ),
            store=await MultiProcessStore.create_store(),
        ),

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 1, 2025
Copy link
Contributor

@pbontrager pbontrager left a comment

Choose a reason for hiding this comment

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

I'm just not sure from this how store is getting passed in but otherwise looks good

Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be a check that the new version exists on the store?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was just thinking that it would fail when trying to lookup the key and that would be obvious enough for now, but I could make it more explicit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does spawn services need to know to pass this in?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it has to be passed in from the top level so you can use the same for Trainer.

@joecummings
Copy link
Member Author

I'm just not sure from this how store is getting passed in but otherwise looks good

Yeah, the launch logic IMO is really confusing - took me awhile to figure out why store was not being passed into the policy worker. This is a consequence of the launch vs init params of the service. Worth a discussion later as to which is preferred. Having both right now is just confusing.

@joecummings joecummings merged commit 6d6c9a4 into meta-pytorch:main Sep 1, 2025
4 checks passed
@joecummings joecummings deleted the add-torchstore-to-policy branch September 1, 2025 21:18
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.

2 participants