File tree Expand file tree Collapse file tree 2 files changed +0
-10
lines changed Expand file tree Collapse file tree 2 files changed +0
-10
lines changed Original file line number Diff line number Diff line change 11import importlib .util
22import json
3- import warnings
43from pathlib import Path
54from typing import Any , Optional , Union
65
@@ -24,14 +23,6 @@ def from_pretrained(
2423 :param model_dir: The path to cache the downloaded model configuration. Should be a full path. If None, use default cache path.
2524 :return:
2625 """
27- if "pretrained_model_name" in kwargs :
28- warnings .warn (
29- "[CCCV] 'pretrained_model_name' is deprecated, please use 'pretrained_model_name_or_path' instead." ,
30- DeprecationWarning ,
31- stacklevel = 2 ,
32- )
33- pretrained_model_name_or_path = kwargs .pop ("pretrained_model_name" )
34-
3526 # 1. check if it's a registered config name, early return if found
3627 if isinstance (pretrained_model_name_or_path , ConfigType ):
3728 pretrained_model_name_or_path = pretrained_model_name_or_path .value
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ def from_config(
8686 :param gh_proxy: The proxy for downloading from github release. Example: https://github.abskoop.workers.dev/
8787 :return:
8888 """
89-
9089 model = MODEL_REGISTRY .get (config .model )
9190 model = model (
9291 config = config ,
You can’t perform that action at this time.
0 commit comments