Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
shigeki Ishida
commited on
Commit
•
0ef9174
1
Parent(s):
d79378a
Remove 'Unknown' and '?' from enum values
Browse files- app.py +1 -1
- src/display/utils.py +6 -8
app.py
CHANGED
@@ -586,7 +586,7 @@ with gr.Blocks() as demo_submission:
|
|
586 |
)
|
587 |
add_special_tokens = gr.Dropdown(
|
588 |
label="AddSpecialTokens",
|
589 |
-
choices=[i.value.name for i in AddSpecialTokens
|
590 |
multiselect=False,
|
591 |
value="False",
|
592 |
)
|
|
|
586 |
)
|
587 |
add_special_tokens = gr.Dropdown(
|
588 |
label="AddSpecialTokens",
|
589 |
+
choices=[i.value.name for i in AddSpecialTokens],
|
590 |
multiselect=False,
|
591 |
value="False",
|
592 |
)
|
src/display/utils.py
CHANGED
@@ -145,7 +145,6 @@ class Precision(Enum):
|
|
145 |
class AddSpecialTokens(Enum):
|
146 |
true = ModelDetails("True")
|
147 |
false = ModelDetails("False")
|
148 |
-
Unknown = ModelDetails("?")
|
149 |
|
150 |
|
151 |
class NumFewShots(Enum):
|
@@ -163,23 +162,22 @@ class NumFewShots(Enum):
|
|
163 |
|
164 |
class LLMJpEvalVersion(Enum):
|
165 |
current = ModelDetails("v1.4.1")
|
166 |
-
Unknown = ModelDetails("?")
|
167 |
|
168 |
-
|
|
|
169 |
if version == "1.4.1":
|
170 |
return LLMJpEvalVersion.current
|
171 |
-
|
172 |
-
return LLMJpEvalVersion.Unknown
|
173 |
|
174 |
|
175 |
class VllmVersion(Enum):
|
176 |
current = ModelDetails("v0.6.3.post1")
|
177 |
-
Unknown = ModelDetails("?")
|
178 |
|
179 |
-
|
|
|
180 |
if version == "v0.6.3.post1":
|
181 |
return VllmVersion.current
|
182 |
-
|
183 |
|
184 |
|
185 |
# Column selection
|
|
|
145 |
class AddSpecialTokens(Enum):
|
146 |
true = ModelDetails("True")
|
147 |
false = ModelDetails("False")
|
|
|
148 |
|
149 |
|
150 |
class NumFewShots(Enum):
|
|
|
162 |
|
163 |
class LLMJpEvalVersion(Enum):
|
164 |
current = ModelDetails("v1.4.1")
|
|
|
165 |
|
166 |
+
@staticmethod
|
167 |
+
def from_str(version: str) -> "LLMJpEvalVersion":
|
168 |
if version == "1.4.1":
|
169 |
return LLMJpEvalVersion.current
|
170 |
+
raise ValueError(f"Unsupported LLMJpEval version: {version}")
|
|
|
171 |
|
172 |
|
173 |
class VllmVersion(Enum):
|
174 |
current = ModelDetails("v0.6.3.post1")
|
|
|
175 |
|
176 |
+
@staticmethod
|
177 |
+
def from_str(version: str) -> "VllmVersion":
|
178 |
if version == "v0.6.3.post1":
|
179 |
return VllmVersion.current
|
180 |
+
raise ValueError(f"Unsupported VLLM version: {version}")
|
181 |
|
182 |
|
183 |
# Column selection
|