lixuejing
commited on
Commit
·
f912d75
1
Parent(s):
0d18314
fix trust_remote_code=True
Browse files
src/submission/check_validity.py
CHANGED
@@ -33,7 +33,7 @@ def check_model_card(repo_id: str) -> tuple[bool, str]:
|
|
33 |
|
34 |
return True, ""
|
35 |
|
36 |
-
def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_remote_code=
|
37 |
"""Checks if the model model_name is on the hub, and whether it (and its tokenizer) can be loaded with AutoClasses."""
|
38 |
try:
|
39 |
config = AutoConfig.from_pretrained(model_name, revision=revision, trust_remote_code=trust_remote_code, token=token)
|
|
|
33 |
|
34 |
return True, ""
|
35 |
|
36 |
+
def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_remote_code=True, test_tokenizer=False) -> tuple[bool, str]:
|
37 |
"""Checks if the model model_name is on the hub, and whether it (and its tokenizer) can be loaded with AutoClasses."""
|
38 |
try:
|
39 |
config = AutoConfig.from_pretrained(model_name, revision=revision, trust_remote_code=trust_remote_code, token=token)
|