@@ -215,17 +215,21 @@ def is_valid(self) -> tuple[bool, Optional[str]]:
215215 int (self .is_per_tensor_act_quant ) +
216216 int (self .quant_block_shape is not None )) > 1 :
217217 # invalid quant config
218- return False , "Bad quant_config."
218+ return False , f "Bad quant_config { self . quant_config } ."
219219
220220 # check type support
221221 if self .quant_dtype is None :
222222 if (self .dtype not in self .pf_supported_types ()
223223 or self .dtype not in self .fe_supported_types ()):
224- return False , "Unsupported type 1."
224+ return False , (f"Unsupported type { self .dtype } not in "
225+ f"{ self .pf_supported_types ()} and "
226+ f"{ self .fe_supported_types ()} ." )
225227 else :
226228 if (self .quant_dtype not in self .pf_supported_types ()
227229 or self .quant_dtype not in self .fe_supported_types ()):
228- return False , "Unsupported type 2."
230+ return False , (f"Unsupported quant type { self .quant_dtype } "
231+ f"not in { self .pf_supported_types ()} and "
232+ f"{ self .fe_supported_types ()} ." )
229233
230234 # Check block quanization support
231235 is_block_quatized = self .quant_block_shape is not None
@@ -241,11 +245,11 @@ def is_valid(self) -> tuple[bool, Optional[str]]:
241245
242246 # Check dependencies (turn into asserts?)
243247 if self .needs_deep_ep () and not has_deep_ep ():
244- return False , "Needs DeepEP."
248+ return False , "Needs DeepEP, but DeepEP not available ."
245249 if self .needs_deep_gemm () and not has_deep_gemm ():
246- return False , "Needs DeepGEMM."
250+ return False , "Needs DeepGEMM, but DeepGEMM not available ."
247251 if self .needs_pplx () and not has_pplx (): # noqa: SIM103
248- return False , "Needs PPLX."
252+ return False , "Needs PPLX, but PPLX not available ."
249253
250254 return True , None
251255
0 commit comments