Spaces:
Runtime error
Runtime error
Commit
β’
e3ec4e5
1
Parent(s):
8e2cf54
fix
Browse files
app.py
CHANGED
@@ -74,71 +74,69 @@ with demo:
|
|
74 |
)
|
75 |
gr.HTML(pretrained_fig.data)
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
rl_dataset
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
)
|
121 |
-
gr.HTML(rl_fig.data)
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
|
143 |
|
144 |
def restart_space():
|
|
|
74 |
)
|
75 |
gr.HTML(pretrained_fig.data)
|
76 |
|
77 |
+
with gr.TabItem(label="Instructions Finetuend Models"):
|
78 |
+
inst_finetuned_fig, ax = plt.subplots(figsize=(12, 6))
|
79 |
+
ax.set_xlim(0, 100)
|
80 |
+
inst_finetuned_dataset = open_llm_race_dataset[
|
81 |
+
open_llm_race_dataset["type"] == ModelType.IFT.name
|
82 |
+
]
|
83 |
+
inst_finetuned_dataset = inst_finetuned_dataset.pivot(
|
84 |
+
index="date", columns="model", values="score"
|
85 |
+
)
|
86 |
+
inst_finetuned_dataset.fillna(0, inplace=True)
|
87 |
+
inst_finetuned_fig = bcr.bar_chart_race(
|
88 |
+
inst_finetuned_dataset,
|
89 |
+
n_bars=10,
|
90 |
+
fixed_max=True,
|
91 |
+
period_length=1000,
|
92 |
+
steps_per_period=20,
|
93 |
+
end_period_pause=100,
|
94 |
+
bar_texttemplate="{x:.2f}",
|
95 |
+
filter_column_colors=True,
|
96 |
+
fig=inst_finetuned_fig,
|
97 |
+
)
|
98 |
+
gr.HTML(inst_finetuned_fig.data)
|
99 |
|
100 |
+
with gr.TabItem(label="RLHF Models"):
|
101 |
+
rl_fig, ax = plt.subplots(figsize=(12, 6))
|
102 |
+
ax.set_xlim(0, 100)
|
103 |
+
rl_dataset = open_llm_race_dataset[
|
104 |
+
open_llm_race_dataset["type"] == ModelType.IFT.name
|
105 |
+
]
|
106 |
+
rl_dataset = rl_dataset.pivot(index="date", columns="model", values="score")
|
107 |
+
rl_dataset.fillna(0, inplace=True)
|
108 |
+
rl_fig = bcr.bar_chart_race(
|
109 |
+
rl_dataset,
|
110 |
+
n_bars=10,
|
111 |
+
fixed_max=True,
|
112 |
+
period_length=1000,
|
113 |
+
steps_per_period=20,
|
114 |
+
end_period_pause=100,
|
115 |
+
bar_texttemplate="{x:.2f}",
|
116 |
+
filter_column_colors=True,
|
117 |
+
fig=rl_fig,
|
118 |
+
)
|
119 |
+
gr.HTML(rl_fig.data)
|
|
|
|
|
120 |
|
121 |
+
# with gr.TabItem(label="Finetuned Models"):
|
122 |
+
# finetuned_dataset = open_llm_race_dataset[
|
123 |
+
# open_llm_race_dataset["type"] == ModelType.FT.name
|
124 |
+
# ]
|
125 |
+
# finetuned_dataset = finetuned_dataset.pivot(
|
126 |
+
# index="date", columns="model", values="score"
|
127 |
+
# )
|
128 |
+
# finetuned_fig = bcr.bar_chart_race(
|
129 |
+
# finetuned_dataset,
|
130 |
+
# n_bars=10,
|
131 |
+
# fixed_max=True,
|
132 |
+
# period_length=1000,
|
133 |
+
# steps_per_period=20,
|
134 |
+
# end_period_pause=100,
|
135 |
+
# bar_texttemplate="{x:.2f}",
|
136 |
+
# filter_column_colors=True,
|
137 |
+
# fig=pretrained_fig,
|
138 |
+
# )
|
139 |
+
# gr.HTML(finetuned_fig.data)
|
140 |
|
141 |
|
142 |
def restart_space():
|