From 171020c775cec6ff77826c3f5f5e5c1498b23f81 Mon Sep 17 00:00:00 2001 From: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:05:47 +0200 Subject: [PATCH] Remove warning (#1945) Remove incorrect warning --- optimum/modeling_base.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/optimum/modeling_base.py b/optimum/modeling_base.py index 74b05d5b15..6f3f641b43 100644 --- a/optimum/modeling_base.py +++ b/optimum/modeling_base.py @@ -415,13 +415,6 @@ def from_pretrained( trust_remote_code=trust_remote_code, ) - if not export and trust_remote_code: - logger.warning( - "The argument `trust_remote_code` is to be used along with export=True. It will be ignored." - ) - elif export and trust_remote_code is None: - trust_remote_code = False - from_pretrained_method = cls._from_transformers if export else cls._from_pretrained return from_pretrained_method(