-
Notifications
You must be signed in to change notification settings - Fork 365
v0 param server (using collectives not object store) #2865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh/mikaylagawarecki/2/base
Are you sure you want to change the base?
v0 param server (using collectives not object store) #2865
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2865
Note: Links to docs will display an error until the docs builds have been completed. ❌ 7 New Failures, 1 Cancelled Job, 1 Unrelated FailureAs of commit 32c10d7 with merge base 04d70c1 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
param_server_weight_updater.py
Outdated
handle = self.collector._remote_collectors[worker_id].call_policy_method.remote( | ||
"collective_rpc", | ||
("update_weight",), | ||
{'args': (k, v.dtype, v.shape)} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vmoens This is one part where I'm trying to call a method on the LLM object to init a process group with the vllm workers, the second part is below on L293
In this case
SyncDataCollector
is remote and has an attribute .policy
.policy
is the ModuleDict object returned by from_vllm
, and the actual llm instance is in the generate key (the LLM instance is local to the SyncDataCollector)
How can I have a handle to the LLM instance within the SyncDataCollector to call remote methods on it without the hacky call_policy_method
implementation below?
[ghstack-poisoned]
[ghstack-poisoned]
# here again, I want to grab the tp size from the vLLM worker... :( | ||
# llm.llm_engine.parallel_config.tensor_parallel_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vmoens I keep finding that I want to get info off vllm directly :/, what would you do here?
Should this vLLMRemoteWeightUpdaterBase be aware of all the vllm engines and tp size of each owned by its parent RayCollector in its __init__
, I already needed to pass separate master_address and master_port I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, there's no way around it
We need for the main worker to know that stuff about the remote ones
[ghstack-poisoned]
[ghstack-poisoned]
|
||
|
||
VLLM_ERR = None | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import find_spec
might be preferred: https://docs.python.org/3/library/importlib.html#importlib.util.find_spec as it doesn't do the actual import until needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, that's the proper way to do it
All third party imports should be done locally even if not optional (otherwise that slows down multiproc / distributed start time and can cause bugs that are hard to debug)
[ghstack-poisoned]
Stack from ghstack (oldest at bottom):