@@ -28,7 +28,8 @@ class LaunchResponseFormatter:
2828 Parameters
2929 ----------
3030 model_name : str
31- Name of the launched model params : dict[str, Any] Launch parameters and configuration
31+ Name of the launched model params : dict[str, Any] Launch parameters and
32+ configuration
3233 """
3334
3435 def __init__ (self , model_name : str , params : dict [str , Any ]):
@@ -115,14 +116,28 @@ def format_table_output(self) -> Table:
115116 for model_name in self .params ["models" ]:
116117 table .add_row ("Model Name" , model_name , style = "magenta" )
117118 # Add resource allocation details
118- table .add_row ("Partition" , f" { self .params ['models' ][model_name ]['partition' ]} " )
119+ table .add_row (
120+ "Partition" , f" { self .params ['models' ][model_name ]['partition' ]} "
121+ )
119122 table .add_row ("QoS" , f" { self .params ['models' ][model_name ]['qos' ]} " )
120- table .add_row ("Time Limit" , f" { self .params ['models' ][model_name ]['time' ]} " )
121- table .add_row ("Num Nodes" , f" { self .params ['models' ][model_name ]['num_nodes' ]} " )
122- table .add_row ("GPUs/Node" , f" { self .params ['models' ][model_name ]['gpus_per_node' ]} " )
123- table .add_row ("CPUs/Task" , f" { self .params ['models' ][model_name ]['cpus_per_task' ]} " )
124- table .add_row ("Memory/Node" , f" { self .params ['models' ][model_name ]['mem_per_node' ]} " )
125- table .add_row ("Log Directory" , f" { self .params ['models' ][model_name ]['log_dir' ]} " )
123+ table .add_row (
124+ "Time Limit" , f" { self .params ['models' ][model_name ]['time' ]} "
125+ )
126+ table .add_row (
127+ "Num Nodes" , f" { self .params ['models' ][model_name ]['num_nodes' ]} "
128+ )
129+ table .add_row (
130+ "GPUs/Node" , f" { self .params ['models' ][model_name ]['gpus_per_node' ]} "
131+ )
132+ table .add_row (
133+ "CPUs/Task" , f" { self .params ['models' ][model_name ]['cpus_per_task' ]} "
134+ )
135+ table .add_row (
136+ "Memory/Node" , f" { self .params ['models' ][model_name ]['mem_per_node' ]} "
137+ )
138+ table .add_row (
139+ "Log Directory" , f" { self .params ['models' ][model_name ]['log_dir' ]} "
140+ )
126141
127142 return table
128143
@@ -342,7 +357,9 @@ def __init__(self, console: Console, json_mode: bool = False):
342357 self .model_config = None
343358 self .model_names : list [str ] = []
344359
345- def _format_single_model_output (self , config : ModelConfig ) -> Union [dict [str , Any ], Table ]:
360+ def _format_single_model_output (
361+ self , config : ModelConfig
362+ ) -> Union [dict [str , Any ], Table ]:
346363 """Format output table for a single model.
347364
348365 Parameters
@@ -360,7 +377,9 @@ def _format_single_model_output(self, config: ModelConfig) -> Union[dict[str, An
360377 excluded = {"venv" , "log_dir" }
361378 config_dict = config .model_dump (exclude = excluded )
362379 # Convert Path objects to strings
363- config_dict ["model_weights_parent_dir" ] = str (config_dict ["model_weights_parent_dir" ])
380+ config_dict ["model_weights_parent_dir" ] = str (
381+ config_dict ["model_weights_parent_dir" ]
382+ )
364383 return config_dict
365384
366385 table = create_table (key_title = "Model Config" , value_title = "Value" )
@@ -373,7 +392,9 @@ def _format_single_model_output(self, config: ModelConfig) -> Union[dict[str, An
373392 table .add_row (f" { vllm_arg } :" , str (vllm_value ))
374393 return table
375394
376- def _format_all_models_output (self , model_infos : list [ModelInfo ]) -> Union [list [str ], list [Panel ]]:
395+ def _format_all_models_output (
396+ self , model_infos : list [ModelInfo ]
397+ ) -> Union [list [str ], list [Panel ]]:
377398 """Format output table for all models.
378399
379400 Parameters
0 commit comments