Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -990,14 +990,14 @@ with ui.navset_card_tab(id="tab"):
|
|
990 |
"Select Model Type:",
|
991 |
["pythia", "denseformer"],
|
992 |
multiple=True,
|
993 |
-
selected='pythia'
|
994 |
)
|
995 |
ui.input_selectize(
|
996 |
"loss_type",
|
997 |
"Select Loss Type:",
|
998 |
["compliment", "cross_entropy", "headless"],
|
999 |
multiple=True,
|
1000 |
-
selected=
|
1001 |
)
|
1002 |
def plot_loss_rates_model(df, param_types, loss_types, model_types):
|
1003 |
# interplot each column to be same number of points
|
@@ -1009,7 +1009,7 @@ 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']
|
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)
|
|
|
990 |
"Select Model Type:",
|
991 |
["pythia", "denseformer"],
|
992 |
multiple=True,
|
993 |
+
selected=['pythia','denseformer']
|
994 |
)
|
995 |
ui.input_selectize(
|
996 |
"loss_type",
|
997 |
"Select Loss Type:",
|
998 |
["compliment", "cross_entropy", "headless"],
|
999 |
multiple=True,
|
1000 |
+
selected=["compliment", "cross_entropy", "headless"]
|
1001 |
)
|
1002 |
def plot_loss_rates_model(df, param_types, loss_types, model_types):
|
1003 |
# interplot each column to be same number of points
|
|
|
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(param_type +'_'+loss_type +'_'+model_type)
|