File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -146,16 +146,18 @@ def launch(
146
146
"""
147
147
try :
148
148
# Convert cli_kwargs to LaunchOptions
149
- kwargs = {k : v for k , v in cli_kwargs .items () if k != "json_mode" }
150
- launch_options = LaunchOptions (** kwargs )
149
+ json_mode = cli_kwargs ["json_mode" ]
150
+ del cli_kwargs ["json_mode" ]
151
+
152
+ launch_options = LaunchOptions (** cli_kwargs ) # type: ignore
151
153
152
154
# Start the client and launch model inference server
153
155
client = VecInfClient ()
154
156
launch_response = client .launch_model (model_name , launch_options )
155
157
156
158
# Display launch information
157
159
launch_formatter = LaunchResponseFormatter (model_name , launch_response .config )
158
- if cli_kwargs . get ( " json_mode" ) :
160
+ if json_mode :
159
161
click .echo (launch_response .config )
160
162
else :
161
163
launch_info_table = launch_formatter .format_table_output ()
You can’t perform that action at this time.
0 commit comments