Spaces:
Runtime error
Runtime error
Commit
·
37d35c3
1
Parent(s):
30632f8
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,14 +22,33 @@ BENCHMARKS = {
|
|
| 22 |
|
| 23 |
def plot_acc_param(param_compare_results_df: pl.DataFrame, width: int = 1000, height: int = 680) -> alt.LayerChart:
|
| 24 |
df = param_compare_results_df.select(
|
| 25 |
-
"Model name",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
)
|
| 27 |
base = df.plot.point(
|
| 28 |
x="Parameters (M)",
|
| 29 |
y="Accuracy",
|
| 30 |
color="Model type",
|
| 31 |
shape="Resolution:N",
|
| 32 |
-
tooltip=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
)
|
| 34 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|
| 35 |
frontier = df.plot.line(x="Parameters (M)", y="Pareto frontier (p)").mark_line(
|
|
@@ -57,6 +76,9 @@ def plot_acc_memory(memory_compare_results_df: pl.DataFrame, width: int = 900, h
|
|
| 57 |
"Peak GPU memory (MB)",
|
| 58 |
"Parameters (M)",
|
| 59 |
"Pareto frontier (mem)",
|
|
|
|
|
|
|
|
|
|
| 60 |
)
|
| 61 |
base = df.plot.point(
|
| 62 |
x="Peak GPU memory (MB)",
|
|
@@ -71,6 +93,9 @@ def plot_acc_memory(memory_compare_results_df: pl.DataFrame, width: int = 900, h
|
|
| 71 |
"Model name",
|
| 72 |
"Model type",
|
| 73 |
"Resolution",
|
|
|
|
|
|
|
|
|
|
| 74 |
],
|
| 75 |
)
|
| 76 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|
|
@@ -107,6 +132,9 @@ def plot_acc_rate(rate_compare_results_df: pl.DataFrame, width: int = 1000, heig
|
|
| 107 |
"ms / sample",
|
| 108 |
"Parameters (M)",
|
| 109 |
"Pareto frontier (ms)",
|
|
|
|
|
|
|
|
|
|
| 110 |
)
|
| 111 |
base = df.plot.point(
|
| 112 |
x="ms / sample",
|
|
@@ -121,6 +149,9 @@ def plot_acc_rate(rate_compare_results_df: pl.DataFrame, width: int = 1000, heig
|
|
| 121 |
"Model name",
|
| 122 |
"Model type",
|
| 123 |
"Resolution",
|
|
|
|
|
|
|
|
|
|
| 124 |
],
|
| 125 |
)
|
| 126 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|
|
|
|
| 22 |
|
| 23 |
def plot_acc_param(param_compare_results_df: pl.DataFrame, width: int = 1000, height: int = 680) -> alt.LayerChart:
|
| 24 |
df = param_compare_results_df.select(
|
| 25 |
+
"Model name",
|
| 26 |
+
"Model type",
|
| 27 |
+
"Accuracy",
|
| 28 |
+
"Top-3 accuracy",
|
| 29 |
+
"Resolution",
|
| 30 |
+
"Parameters (M)",
|
| 31 |
+
"Pareto frontier (p)",
|
| 32 |
+
"Intermediate",
|
| 33 |
+
"MIM",
|
| 34 |
+
"Distilled",
|
| 35 |
)
|
| 36 |
base = df.plot.point(
|
| 37 |
x="Parameters (M)",
|
| 38 |
y="Accuracy",
|
| 39 |
color="Model type",
|
| 40 |
shape="Resolution:N",
|
| 41 |
+
tooltip=[
|
| 42 |
+
"Parameters (M)",
|
| 43 |
+
"Accuracy",
|
| 44 |
+
"Top-3 accuracy",
|
| 45 |
+
"Model name",
|
| 46 |
+
"Model type",
|
| 47 |
+
"Resolution",
|
| 48 |
+
"Intermediate",
|
| 49 |
+
"MIM",
|
| 50 |
+
"Distilled",
|
| 51 |
+
],
|
| 52 |
)
|
| 53 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|
| 54 |
frontier = df.plot.line(x="Parameters (M)", y="Pareto frontier (p)").mark_line(
|
|
|
|
| 76 |
"Peak GPU memory (MB)",
|
| 77 |
"Parameters (M)",
|
| 78 |
"Pareto frontier (mem)",
|
| 79 |
+
"Intermediate",
|
| 80 |
+
"MIM",
|
| 81 |
+
"Distilled",
|
| 82 |
)
|
| 83 |
base = df.plot.point(
|
| 84 |
x="Peak GPU memory (MB)",
|
|
|
|
| 93 |
"Model name",
|
| 94 |
"Model type",
|
| 95 |
"Resolution",
|
| 96 |
+
"Intermediate",
|
| 97 |
+
"MIM",
|
| 98 |
+
"Distilled",
|
| 99 |
],
|
| 100 |
)
|
| 101 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|
|
|
|
| 132 |
"ms / sample",
|
| 133 |
"Parameters (M)",
|
| 134 |
"Pareto frontier (ms)",
|
| 135 |
+
"Intermediate",
|
| 136 |
+
"MIM",
|
| 137 |
+
"Distilled",
|
| 138 |
)
|
| 139 |
base = df.plot.point(
|
| 140 |
x="ms / sample",
|
|
|
|
| 149 |
"Model name",
|
| 150 |
"Model type",
|
| 151 |
"Resolution",
|
| 152 |
+
"Intermediate",
|
| 153 |
+
"MIM",
|
| 154 |
+
"Distilled",
|
| 155 |
],
|
| 156 |
)
|
| 157 |
text = base.mark_text(align="center", baseline="middle", dy=-10).encode(text="Model name")
|