Skip to content

Commit

Permalink
Fix warning (huggingface#582)
Browse files Browse the repository at this point in the history
* Fix warning

* fix message warning
  • Loading branch information
echarlaix authored and PenghuiCheng committed Mar 13, 2024
1 parent ca33bed commit 22bc3d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optimum/intel/generation/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ def __init__(
self.normalized_config = NormalizedConfigManager.get_normalized_config_class(config.model_type)(config)
self.model_dtype = kwargs.get("model_dtype", None)

logger.warning(
f"The class `{self.__class__}` has been depreciated and will be removed in optimum-intel v1.14, please use IPEXModel instead"
)
if isinstance(model, torch.jit.ScriptModule):
self.input_names = {
inputs.debugName().split(".")[0] for inputs in model.graph.inputs() if inputs.debugName() != "self"
}
logger.warning(
f"The class `{self.__class__}` has been depreciated for TorchScript model, please use `IPEXModelForCausalLM` instead"
)
else:
self.input_names = set()

Expand Down

0 comments on commit 22bc3d0

Please sign in to comment.