Spaces:
Running
Running
BenchmarkBot
commited on
Commit
Β·
b075f8f
1
Parent(s):
35b1013
added submit button
Browse files
app.py
CHANGED
@@ -66,22 +66,17 @@ def change_tab(query_param):
|
|
66 |
return gr.Tabs.update(selected=0)
|
67 |
|
68 |
|
69 |
-
def
|
70 |
-
filtered_single = single_df[single_df["Model π€"].str.contains(
|
71 |
-
filtered_multi = multi_df[multi_df["Model π€"].str.contains(query)]
|
72 |
-
return filtered_single, filtered_multi
|
73 |
-
|
74 |
-
|
75 |
-
def filter_tables(single_df, multi_df, backends, datatypes, threshold):
|
76 |
filtered_single = single_df[single_df["Backend π"].isin(backends)]
|
77 |
filtered_single = filtered_single[filtered_single["Datatype π₯"].isin(
|
78 |
datatypes)]
|
|
|
79 |
|
|
|
80 |
filtered_multi = multi_df[multi_df["Backend π"].isin(backends)]
|
81 |
filtered_multi = filtered_multi[filtered_multi["Datatype π₯"].isin(
|
82 |
datatypes)]
|
83 |
-
|
84 |
-
filtered_single = single_df[single_df["Average H4 Score β¬οΈ"] >= threshold]
|
85 |
filtered_multi = multi_df[multi_df["Average H4 Score β¬οΈ"] >= threshold]
|
86 |
|
87 |
return filtered_single, filtered_multi
|
@@ -99,24 +94,24 @@ with demo:
|
|
99 |
search_bar = gr.Textbox(
|
100 |
label="Search π",
|
101 |
info="Search for a model",
|
102 |
-
placeholder="Write and press ENTER...",
|
103 |
elem_id="search-bar",
|
104 |
)
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
120 |
|
121 |
with gr.Row():
|
122 |
with gr.Box(elem_id="threshold-slider-box"):
|
@@ -130,12 +125,12 @@ with demo:
|
|
130 |
elem_id="threshold-slider",
|
131 |
)
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
141 |
with gr.TabItem("π₯οΈ A100-80GB Benchmark ποΈ", elem_id="A100-benchmark", id=0):
|
@@ -165,7 +160,7 @@ with demo:
|
|
165 |
visible=False,
|
166 |
)
|
167 |
|
168 |
-
with gr.TabItem("π₯οΈ 4xA100-80GB
|
169 |
MULTI_A100_TEXT = """<h3>Multi-GPU (4xA100):</h3>
|
170 |
<ul>
|
171 |
<li>Singleton Batch (1)</li>
|
@@ -190,29 +185,10 @@ with demo:
|
|
190 |
)
|
191 |
|
192 |
# Callbacks
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
)
|
198 |
-
backend_checkboxes.select(
|
199 |
-
filter_tables,
|
200 |
-
[single_A100_for_search, multi_A100_for_search,
|
201 |
-
backend_checkboxes, datatype_checkboxes, threshold_slider],
|
202 |
-
[single_A100_leaderboard, multi_A100_leaderboard],
|
203 |
-
)
|
204 |
-
datatype_checkboxes.select(
|
205 |
-
filter_tables,
|
206 |
-
[single_A100_for_search, multi_A100_for_search,
|
207 |
-
backend_checkboxes, datatype_checkboxes, threshold_slider],
|
208 |
-
[single_A100_leaderboard, multi_A100_leaderboard],
|
209 |
-
)
|
210 |
-
threshold_slider.release(
|
211 |
-
filter_tables,
|
212 |
-
[single_A100_for_search, multi_A100_for_search,
|
213 |
-
backend_checkboxes, datatype_checkboxes, threshold_slider],
|
214 |
-
[single_A100_leaderboard, multi_A100_leaderboard],
|
215 |
-
)
|
216 |
|
217 |
with gr.Row():
|
218 |
with gr.Accordion("π Citation", open=False):
|
|
|
66 |
return gr.Tabs.update(selected=0)
|
67 |
|
68 |
|
69 |
+
def submit_query(single_df, multi_df, text, backends, datatypes, threshold):
|
70 |
+
filtered_single = single_df[single_df["Model π€"].str.contains(text)]
|
|
|
|
|
|
|
|
|
|
|
71 |
filtered_single = single_df[single_df["Backend π"].isin(backends)]
|
72 |
filtered_single = filtered_single[filtered_single["Datatype π₯"].isin(
|
73 |
datatypes)]
|
74 |
+
filtered_single = single_df[single_df["Average H4 Score β¬οΈ"] >= threshold]
|
75 |
|
76 |
+
filtered_multi = multi_df[multi_df["Model π€"].str.contains(text)]
|
77 |
filtered_multi = multi_df[multi_df["Backend π"].isin(backends)]
|
78 |
filtered_multi = filtered_multi[filtered_multi["Datatype π₯"].isin(
|
79 |
datatypes)]
|
|
|
|
|
80 |
filtered_multi = multi_df[multi_df["Average H4 Score β¬οΈ"] >= threshold]
|
81 |
|
82 |
return filtered_single, filtered_multi
|
|
|
94 |
search_bar = gr.Textbox(
|
95 |
label="Search π",
|
96 |
info="Search for a model",
|
|
|
97 |
elem_id="search-bar",
|
98 |
)
|
99 |
|
100 |
+
with gr.Column(scale=1):
|
101 |
+
backend_checkboxes = gr.CheckboxGroup(
|
102 |
+
choices=["pytorch", "onnxruntime"],
|
103 |
+
value=["pytorch"],
|
104 |
+
label="Backends π",
|
105 |
+
info="Select the backends",
|
106 |
+
elem_id="backend-checkboxes",
|
107 |
+
)
|
108 |
+
datatype_checkboxes = gr.CheckboxGroup(
|
109 |
+
choices=["float32", "float16"],
|
110 |
+
value=["float32", "float16"],
|
111 |
+
label="Datatypes π₯",
|
112 |
+
info="Select the load datatypes",
|
113 |
+
elem_id="datatype-checkboxes",
|
114 |
+
)
|
115 |
|
116 |
with gr.Row():
|
117 |
with gr.Box(elem_id="threshold-slider-box"):
|
|
|
125 |
elem_id="threshold-slider",
|
126 |
)
|
127 |
|
128 |
+
with gr.Row():
|
129 |
+
submit_button = gr.Button(
|
130 |
+
value="Submit π",
|
131 |
+
info="Submit the filters",
|
132 |
+
elem_id="submit-button",
|
133 |
+
)
|
134 |
|
135 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
136 |
with gr.TabItem("π₯οΈ A100-80GB Benchmark ποΈ", elem_id="A100-benchmark", id=0):
|
|
|
160 |
visible=False,
|
161 |
)
|
162 |
|
163 |
+
with gr.TabItem("π₯οΈ 4xA100-80GB Benchmark ποΈ", elem_id="4xA100-benchmark", id=1):
|
164 |
MULTI_A100_TEXT = """<h3>Multi-GPU (4xA100):</h3>
|
165 |
<ul>
|
166 |
<li>Singleton Batch (1)</li>
|
|
|
185 |
)
|
186 |
|
187 |
# Callbacks
|
188 |
+
submit_button.click(submit_query,
|
189 |
+
[single_A100_for_search, multi_A100_for_search, search_bar,
|
190 |
+
backend_checkboxes, datatype_checkboxes, threshold_slider],
|
191 |
+
[single_A100_leaderboard, multi_A100_leaderboard])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
with gr.Row():
|
194 |
with gr.Accordion("π Citation", open=False):
|