@@ -129,20 +129,44 @@ pub async fn run(
129129 let ( maybe_card_path, maybe_card) = match ( & model_path, & flags. model_config ) {
130130 // --model-config takes precedence
131131 ( _, Some ( model_config) ) => {
132- let card = ModelDeploymentCard :: from_local_path ( model_config, model_name. as_deref ( ) )
133- . await
134- . ok ( ) ;
132+ let card =
133+ match ModelDeploymentCard :: from_local_path ( model_config, model_name. as_deref ( ) )
134+ . await
135+ {
136+ Ok ( card) => Some ( card) ,
137+ Err ( e) => {
138+ tracing:: error!(
139+ "Failed to load model card from config path {}: {}" ,
140+ model_config. display( ) ,
141+ e
142+ ) ;
143+ None
144+ }
145+ } ;
135146 ( Some ( model_config. clone ( ) ) , card)
136147 }
137148 // If --model-path is an HF repo use that
138149 ( Some ( model_path) , _) if model_path. is_dir ( ) => {
139- let card = ModelDeploymentCard :: from_local_path ( model_path, model_name. as_deref ( ) )
150+ let card = match ModelDeploymentCard :: from_local_path ( model_path, model_name. as_deref ( ) )
140151 . await
141- . ok ( ) ;
152+ {
153+ Ok ( card) => Some ( card) ,
154+ Err ( e) => {
155+ tracing:: error!(
156+ "Failed to load model card from model path {}: {}" ,
157+ model_path. display( ) ,
158+ e
159+ ) ;
160+ None
161+ }
162+ } ;
142163 ( Some ( model_path. clone ( ) ) , card)
143164 }
144165 // Otherwise we don't have one, but we only need it if we're tokenizing
145- _ => ( None , None ) ,
166+ _ => {
167+ tracing:: debug!( "No model card path provided (neither --model-config nor a directory in --model-path)" ) ;
168+ ( None , None )
169+ }
146170 } ;
147171
148172 #[ cfg( any( feature = "vllm" , feature = "sglang" ) ) ]
@@ -261,7 +285,8 @@ pub async fn run(
261285 } ;
262286 let Some ( card) = maybe_card. clone ( ) else {
263287 anyhow:: bail!(
264- "out=vllm requires --model-path to be an HF repo, or for GGUF add flag --model-config <hf-repo>"
288+ "Failed to load model card: either unsupported HuggingFace repo format \
289+ or for GGUF files --model-config is missing."
265290 ) ;
266291 } ;
267292 let Some ( sock_prefix) = zmq_socket_prefix else {
0 commit comments