Skip to content

Conversation

@njhill
Copy link
Member

@njhill njhill commented Apr 19, 2024

I am still catching up with reviews and only now looking at #4024 which was merged recently, because it impacts #3466 and #3763 that I need to rebase.

These are some minor changes to fix typing, reduce verbosity, reduce list allocations/slicing when running workers, remove some redundant code, etc.

Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

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

Overall it looks good to me. Thanks!

Comment on lines 159 to 172
Copy link
Member

Choose a reason for hiding this comment

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

I considered this, but i think keep the calling-like code is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

@youkaichao could you explain why? it's more code and more indirection and not any more readable...

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps subjective but imo this is actually more readable due to the spacing

Copy link
Member

Choose a reason for hiding this comment

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

In the future I plan to use WorkerWrapper for all executors. calling-like code will be easier to modify because it is similar to existing code, but dict-like code would require many changes.

Kind of like javascript syntax suger: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer

Maybe we should move collect_arg_helper_func to utils, so that in the future all executors can use this.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK I'll revert it. But IMHO it's not a good idea to complicate things based on ideas of future generalization, better to do that at the time. Won't it be essentially the same set of parameters used to initialize the other kinds of workers in other executors too?

Copy link
Member Author

Choose a reason for hiding this comment

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

@youkaichao ok reverted

Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@njhill njhill enabled auto-merge (squash) April 19, 2024 01:21
@youkaichao
Copy link
Member

@njhill there are some bugs in argument passing

@njhill njhill disabled auto-merge April 19, 2024 02:16
Comment on lines 263 to 271
Copy link
Member

Choose a reason for hiding this comment

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

BTW, it's better to document in the doc string to note several usages:

  1. only args/kwargs , all workers share the same args
  2. only args/kwargs + driver_args/driver_kwargs , all workers except for the driver share the same args
  3. all_args/all_kwargs , specify each arg/kwargs for each worker

use_dummy_driver is orthogonal to the above, indicating whether to use dummy driver worker.

As this function goes more and more complicated, I'm thinking of simplifying the usecases. Maybe only 1 and 3 are allowed.

@njhill njhill force-pushed the worker-cleanup branch 2 times, most recently from 92251b4 to 08ccf5f Compare April 22, 2024 17:42
@njhill njhill enabled auto-merge (squash) April 22, 2024 17:56
@njhill njhill merged commit 8f2ea22 into vllm-project:main Apr 23, 2024
@njhill njhill deleted the worker-cleanup branch April 23, 2024 20:43
xjpang pushed a commit to xjpang/vllm that referenced this pull request Apr 25, 2024
robertgshaw2-redhat pushed a commit to neuralmagic/nm-vllm that referenced this pull request Apr 26, 2024
akondrat-amd pushed a commit to akondrat-amd/ci-vllm that referenced this pull request May 1, 2024
z103cb pushed a commit to z103cb/opendatahub_vllm that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants