-
Notifications
You must be signed in to change notification settings - Fork 811
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
cli: Fix deployment CLI not working with deploy . -f config.yaml
#4845
Conversation
@@ -73,26 +73,25 @@ class DeploymentConfigParameters: | |||
def verify( | |||
self, | |||
): | |||
deploy_by_param = ( | |||
self.name | |||
or self.bento |
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.
Removing self.name here
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.
Are we removing self.name
or self.bento
?
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.
Sorry, I meant removing self.bento
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.
Why we need to remove self.bento
here?
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.
Otherwise it would be rejected by the check:
if (
(self.config_dict and self.config_file)
or (self.config_dict and deploy_by_param)
or (self.config_file and deploy_by_param)
):
raise BentoMLException(
"Configure a deployment can only use one of the following: config_dict, config_file, or the other parameters"
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.
Because bentoml deploy .
will consider .
as the bento and this check evaluates to true and then it will skip the file argument
or self.envs | ||
or self.extras | ||
deploy_by_param = any( | ||
param is not None and len(param) > 0 |
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 am afraid you can't judge with this, given there are integer values (scaling_min and scaling_max)
Can we just filter None, meaning it is specified by the users
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.
Yeah initially that was the case, but the default for self.envs
is a list so it will always evaluate to True
if we dont check for it.
Decided to throw error if user use both inline argument and file. CC: @Sherlock113 to update documentation |
What does this PR address?
bentoml deploy . -f config.yaml
ignores the config file passed in.Fixes #(issue)
Before submitting:
guide on how to create a pull request.
pre-commit run -a
script has passed (instructions)?those accordingly? Here are documentation guidelines and tips on writting docs.