Spaces:
Restarting
on
CPU Upgrade
Restarting
on
CPU Upgrade
show gated
Browse files- app.py +7 -1
- src/submission/check_validity.py +3 -0
app.py
CHANGED
@@ -73,7 +73,13 @@ def style_df(df: pd.DataFrame) -> Styler:
|
|
73 |
# new_df = new_df.to_frame()
|
74 |
|
75 |
leaderboard_df_styled = df.style.background_gradient(cmap="RdYlGn")
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
rounding = {'#Params (B)': "{:.1f}"}
|
78 |
for task in Tasks:
|
79 |
rounding[task.value.col_name] = "{:.2f}"
|
|
|
73 |
# new_df = new_df.to_frame()
|
74 |
|
75 |
leaderboard_df_styled = df.style.background_gradient(cmap="RdYlGn")
|
76 |
+
|
77 |
+
inverted_colors_columns = []
|
78 |
+
if "poleval2018_task3_test_10k" in df.columns:
|
79 |
+
inverted_colors_columns.append("poleval2018_task3_test_10k")
|
80 |
+
if "#Params (B)'" in df.columns:
|
81 |
+
inverted_colors_columns.append("#Params (B)'")
|
82 |
+
leaderboard_df_styled = leaderboard_df_styled.background_gradient(cmap="RdYlGn_r", subset=inverted_colors_columns)
|
83 |
rounding = {'#Params (B)': "{:.1f}"}
|
84 |
for task in Tasks:
|
85 |
rounding[task.value.col_name] = "{:.2f}"
|
src/submission/check_validity.py
CHANGED
@@ -59,6 +59,9 @@ def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_rem
|
|
59 |
return True, None, None
|
60 |
return False, f"raised an OSError: {e}", None
|
61 |
|
|
|
|
|
|
|
62 |
except Exception as e:
|
63 |
print(model_name)
|
64 |
print(e)
|
|
|
59 |
return True, None, None
|
60 |
return False, f"raised an OSError: {e}", None
|
61 |
|
62 |
+
except KeyError as e: # old transformers library, don't know new architecture of a model
|
63 |
+
return True, None, None
|
64 |
+
|
65 |
except Exception as e:
|
66 |
print(model_name)
|
67 |
print(e)
|