[CI] Disable non-lazy string operation on logging (#4326)
Co-authored-by: Danny Guinther <dguinther@neuralmagic.com>
This commit is contained in:
co-authored by
Danny Guinther
parent
2f30e7c72f
commit
a88081bf76
@@ -91,8 +91,8 @@ class ModelRegistry:
|
||||
"ROCm for now.")
|
||||
if model_arch in _ROCM_PARTIALLY_SUPPORTED_MODELS:
|
||||
logger.warning(
|
||||
f"Model architecture {model_arch} is partially supported "
|
||||
"by ROCm: " + _ROCM_PARTIALLY_SUPPORTED_MODELS[model_arch])
|
||||
"Model architecture %s is partially supported by ROCm: %s",
|
||||
model_arch, _ROCM_PARTIALLY_SUPPORTED_MODELS[model_arch])
|
||||
|
||||
module_name, model_cls_name = _MODELS[model_arch]
|
||||
module = importlib.import_module(
|
||||
@@ -107,9 +107,9 @@ class ModelRegistry:
|
||||
def register_model(model_arch: str, model_cls: Type[nn.Module]):
|
||||
if model_arch in _MODELS:
|
||||
logger.warning(
|
||||
f"Model architecture {model_arch} is already registered, "
|
||||
"and will be overwritten by the new model "
|
||||
f"class {model_cls.__name__}.")
|
||||
"Model architecture %s is already registered, and will be "
|
||||
"overwritten by the new model class %s.", model_arch,
|
||||
model_cls.__name__)
|
||||
global _OOT_MODELS
|
||||
_OOT_MODELS[model_arch] = model_cls
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@ def _get_gemma_act_fn(
|
||||
"in the config JSON file when it was initially released. "
|
||||
"Changing the activation function to approximate GeLU "
|
||||
"(`gelu_pytorch_tanh`). If you want to use the legacy "
|
||||
f"`{hidden_act}`, edit the config JSON to set "
|
||||
f"`hidden_activation={hidden_act}` instead of `hidden_act`. "
|
||||
"`%s`, edit the config JSON to set "
|
||||
"`hidden_activation=%s` instead of `hidden_act`. "
|
||||
"See https://github.com/huggingface/transformers/pull/29402 "
|
||||
"for more details.")
|
||||
"for more details.", hidden_act, hidden_act)
|
||||
return GeluAndMul(approximate="tanh")
|
||||
elif hidden_activation == "gelu_pytorch_tanh":
|
||||
return GeluAndMul(approximate="tanh")
|
||||
|
||||
Reference in New Issue
Block a user