lixuejing
commited on
Commit
·
6f31b13
1
Parent(s):
f912d75
update
Browse files- src/submission/submit.py +15 -16
src/submission/submit.py
CHANGED
@@ -57,21 +57,21 @@ def add_new_eval(
|
|
57 |
created_at = ""
|
58 |
# Is the model on the hub?
|
59 |
if len(model_api_url)==0:
|
60 |
-
if weight_type in ["Delta", "Adapter"]:
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
if not weight_type == "Adapter":
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
#if not weight_type == "Adapter":
|
76 |
# model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=TOKEN, test_tokenizer=True)
|
77 |
# if not model_on_hub:
|
@@ -82,7 +82,6 @@ def add_new_eval(
|
|
82 |
model_info = API.model_info(repo_id=model, revision=revision)
|
83 |
except Exception:
|
84 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
85 |
-
print("model_info", model_info)
|
86 |
model_size = get_model_size(model_info=model_info, precision=precision)
|
87 |
|
88 |
# Were the model card and license filled?
|
|
|
57 |
created_at = ""
|
58 |
# Is the model on the hub?
|
59 |
if len(model_api_url)==0:
|
60 |
+
#if weight_type in ["Delta", "Adapter"]:
|
61 |
+
# base_model_on_hub, error, _ = is_model_on_hub(model_name=base_model, revision=revision, token=TOKEN, test_tokenizer=True)
|
62 |
+
# if not base_model_on_hub:
|
63 |
+
# return styled_error(f'Base model "{base_model}" {error}')
|
64 |
+
|
65 |
+
#if not weight_type == "Adapter":
|
66 |
+
# model_on_hub, error, model_config = is_model_on_hub(model_name=model, revision=revision, test_tokenizer=True)
|
67 |
+
# if not model_on_hub:
|
68 |
+
# return styled_error(f'Model "{model}" {error}')
|
69 |
+
# if model_config is not None:
|
70 |
+
# architectures = getattr(model_config, "architectures", None)
|
71 |
+
# if architectures:
|
72 |
+
# architecture = ";".join(architectures)
|
73 |
+
# downloads = getattr(model_config, 'downloads', 0)
|
74 |
+
# created_at = getattr(model_config, 'created_at', '')
|
75 |
#if not weight_type == "Adapter":
|
76 |
# model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=TOKEN, test_tokenizer=True)
|
77 |
# if not model_on_hub:
|
|
|
82 |
model_info = API.model_info(repo_id=model, revision=revision)
|
83 |
except Exception:
|
84 |
return styled_error("Could not get your model information. Please fill it up properly.")
|
|
|
85 |
model_size = get_model_size(model_info=model_info, precision=precision)
|
86 |
|
87 |
# Were the model card and license filled?
|