Skip to content

Commit

Permalink
Remove warning (#1945)
Browse files Browse the repository at this point in the history
Remove incorrect warning
  • Loading branch information
echarlaix authored Jul 8, 2024
1 parent 4aa0c14 commit 171020c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions optimum/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 171020c

Please sign in to comment.