File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -406,15 +406,6 @@ def from_pretrained(
406
406
config : Optional [PretrainedConfig ] = None ,
407
407
** kwargs ,
408
408
):
409
- use_auth_token = kwargs .pop ("use_auth_token" , None )
410
- if use_auth_token is not None :
411
- logger .warning (
412
- "The `use_auth_token` argument is deprecated and will be removed soon. Please use the `token` argument instead."
413
- )
414
- if token is not None :
415
- raise ValueError ("You cannot use both `use_auth_token` and `token` arguments at the same time." )
416
- token = use_auth_token
417
-
418
409
if isinstance (model_id , Path ):
419
410
model_id = model_id .as_posix ()
420
411
@@ -447,15 +438,15 @@ def from_pretrained(
447
438
_export = True
448
439
else :
449
440
logger .warning (
450
- f"No ExecuTorch files were found for { model_id } , setting `export=True` to convert the model to the OpenVINO IR. "
441
+ f"No ExecuTorch files were found for { model_id } , setting `export=True` to convert the model to the ExecuTorch IR. "
451
442
# "Don't forget to save the resulting model with `.save_pretrained()`"
452
443
)
453
444
except Exception as exception :
454
445
logger .warning (
455
446
f"Could not infer whether the model was already converted or not to the ExecuTorch IR, keeping `export={ export } `.\n { exception } "
456
447
)
457
448
458
- from_pretrained_method = cls ._export if export else cls ._from_pretrained
449
+ from_pretrained_method = cls ._export if _export else cls ._from_pretrained
459
450
460
451
return from_pretrained_method (
461
452
model_id = model_id ,
You can’t perform that action at this time.
0 commit comments