File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,13 @@ def run(self):
8787 if is_gradio_app :
8888 from swift .utils import find_free_port
8989 LLMInfer .element ('port' ).value = str (find_free_port ())
90+ for f in fields (self .args ):
91+ if getattr (self .args , f .name ) and f .name in LLMInfer .elements () and hasattr (
92+ LLMInfer .elements ()[f .name ], 'value' ) and f .name != 'port' :
93+ value = getattr (self .args , f .name )
94+ if isinstance (value , list ):
95+ value = ' ' .join ([v or '' for v in value ])
96+ LLMInfer .elements ()[f .name ].value = value
9097 app .load (LLMInfer .deploy_model , list (LLMInfer .valid_elements ().values ()),
9198 [LLMInfer .element ('runtime_tab' ),
9299 LLMInfer .element ('running_tasks' )])
Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ def deploy_model(cls, *args):
297297 time .sleep (1 )
298298 cnt += 1
299299 if cnt >= 60 :
300- logger .warn (f'Deploy costing too much time, please check log file: { log_file } ' )
300+ logger .warning_once (f'Deploy costing too much time, please check log file: { log_file } ' )
301301 logger .info ('Deploy done.' )
302302 cls .deployed = True
303303 running_task = Runtime .refresh_tasks (log_file )
You can’t perform that action at this time.
0 commit comments