Skip to content

Commit a375996

Browse files
authored
chore: remove deprecated 'pretrained_model_name' parameter (#8)
1 parent 6e85a15 commit a375996

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

cccv/auto/config.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import importlib.util
22
import json
3-
import warnings
43
from pathlib import Path
54
from 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

cccv/auto/model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)