Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Frontend]-config-cli-args #7737
[Frontend]-config-cli-args #7737
Changes from 5 commits
0d304d7
f36dc39
2bca2fa
ab570d1
7bfc6cb
1779536
ff93954
a9492c4
05164e0
7014a4e
63413aa
4d6f930
0d41c4c
8d84671
c5af059
f6529e3
6e1fe11
175a0d5
7c06e17
98208b3
3d72a70
10054a4
b87593b
56a7054
2c7df07
7b77458
a5b1a3a
d189970
ae178fb
0c1b302
743aee5
295f675
960b047
b6f130d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
how does this deal with options that have default values?
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.
tested. same behaviour. default args are populated in the args.Namespace before it enters the method.
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.
*same ebhaviour as in cli takes presidence, if specified in config file as well. and default in case no where speficied..
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 mean, even if I don't specify
-tp 1
,args.tensor_parallel
will have value. in this case, the default cli value takes precedence over config file, which is not desirable.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.
please bear with me @youkaichao
i see so if i understand correctly.. ideal behavior would be that; the user supplies ALLthe args in config file, if --config has been used, even the default ones? In a manner of speaking the config file will always have ~105 lines in them (current population of namespace)..
so for example:
Ex1
Ex2
$ vllm serve "fabebook/opt-12b" --config config.yaml --port 4 $ [INFO] port = 4
Ex3
$ vllm serve "fabebook/opt-12b" $ [INFO] port = 8000 (default)
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.
Looks like a misunderstanding.
I'm trying to understand, how do you know if
getattr(args, key)
is a default value or a value from commandline?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.
oooh got it!
I understand it now. we will have to handle other cases as well with validating if arguments in config file have membership with the vllm namespace, shorthand etc and c..
with this in mind i think its prudent for us to use
configargparse
which inherits fromargparse
.this will keep the diff small with largest ROI as well. moreover, it doesnt neeed anything more than what is already in vllm's requirements.
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.
PS:
I have also tested the the scratch implementation using sys.argv check for default membership and then overriding args appropirately. we can go ahead with that too if its too much of a leap in faith to use configargparse module..
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.
@youkaichao hope you are doing well.
Unfortunately with
configargparse
the tests are not passing. The server is not able to start quickly enough for the api tests to pass..I will go ahead with the sys.argv implementation since its "lightweight" and more tailor made for our purposes.
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.
@youkaichao i feel good about this. Please let me know what do you think.