Skip to content

Commit 54235e8

Browse files
authored
fix: make sure to use self.args in with_defaults (#5324)
* fix: make sure to fill in override args in with_defaults Signed-off-by: Aaron Pham <contact@aarnphm.xyz> * fix: correctly set args Signed-off-by: Frost Ming <me@frostming.com>
1 parent 5d9f685 commit 54235e8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bentoml/_internal/bento/build_config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,10 @@ def __attrs_post_init__(self) -> None:
886886
f"{self.docker.cuda_version} is not supported for {self.docker.distro}. Supported cuda versions are: {', '.join(spec.supported_cuda_versions)}."
887887
)
888888

889-
if self.args:
890-
# Merge command line args with the ones in the config file
891-
# and the command line args take precedence
892-
set_arguments(**self.args, **BentoMLContainer.bento_arguments.get())
889+
if self.args:
890+
# Merge command line args with the ones in the config file
891+
# and the command line args take precedence
892+
set_arguments(**(self.args | BentoMLContainer.bento_arguments.get()))
893893

894894
def with_defaults(self) -> FilledBentoBuildConfig:
895895
"""
@@ -911,6 +911,7 @@ def with_defaults(self) -> FilledBentoBuildConfig:
911911
conda=self.conda.with_defaults(),
912912
models=self.models,
913913
envs=self.envs,
914+
args=self.args,
914915
)
915916

916917
@property

0 commit comments

Comments
 (0)