Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -983,7 +983,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 983 |
"Select Param Type:",
|
| 984 |
["14", "31", "70", "160"],
|
| 985 |
multiple=True,
|
| 986 |
-
selected=
|
| 987 |
)
|
| 988 |
ui.input_selectize(
|
| 989 |
"model_type",
|
|
@@ -1009,15 +1009,15 @@ with ui.navset_card_tab(id="tab"):
|
|
| 1009 |
for param_type in param_types:
|
| 1010 |
for loss_type in loss_types:
|
| 1011 |
for model_type in model_types:
|
| 1012 |
-
y = df[df['param_type'] ==param_type
|
| 1013 |
f = interp1d(np.linspace(0, 1, len(y)), y)
|
| 1014 |
loss_rates.append(f(x))
|
| 1015 |
-
labels.append(param_type +'_'+loss_type +'_'+model_type)
|
| 1016 |
fig, ax = plt.subplots()
|
| 1017 |
for i, loss_rate in enumerate(loss_rates):
|
| 1018 |
ax.plot(x, loss_rate, label=labels[i])
|
| 1019 |
ax.legend()
|
| 1020 |
-
|
| 1021 |
ax.set_xlabel('Training steps')
|
| 1022 |
ax.set_ylabel('Loss rate')
|
| 1023 |
return fig
|
|
|
|
| 983 |
"Select Param Type:",
|
| 984 |
["14", "31", "70", "160"],
|
| 985 |
multiple=True,
|
| 986 |
+
selected=["14"]
|
| 987 |
)
|
| 988 |
ui.input_selectize(
|
| 989 |
"model_type",
|
|
|
|
| 1009 |
for param_type in param_types:
|
| 1010 |
for loss_type in loss_types:
|
| 1011 |
for model_type in model_types:
|
| 1012 |
+
y = df[df['param_type'] ==param_type && df['loss_type'] == loss_type && df['model_type'] == model_type]['loss'].dropna().astype('float', errors = 'ignore').dropna().values
|
| 1013 |
f = interp1d(np.linspace(0, 1, len(y)), y)
|
| 1014 |
loss_rates.append(f(x))
|
| 1015 |
+
labels.append(str(param_type) +'_'+loss_type +'_'+model_type)
|
| 1016 |
fig, ax = plt.subplots()
|
| 1017 |
for i, loss_rate in enumerate(loss_rates):
|
| 1018 |
ax.plot(x, loss_rate, label=labels[i])
|
| 1019 |
ax.legend()
|
| 1020 |
+
# ax.set_title(f'Loss rates for a parameter model across context windows')
|
| 1021 |
ax.set_xlabel('Training steps')
|
| 1022 |
ax.set_ylabel('Loss rate')
|
| 1023 |
return fig
|