djstrong commited on
Commit
59f4209
1 Parent(s): 6cd6b86

n-shot filter

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -73,11 +73,12 @@ def update_table(
73
  type_query: list,
74
  precision_query: str,
75
  size_query: list,
 
76
  show_deleted: bool,
77
  query: str,
78
  ):
79
  print('1', len(hidden_df))
80
- filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
81
  print('2', len(filtered_df))
82
  filtered_df = filter_queries(query, filtered_df)
83
  print('3', len(filtered_df))
@@ -122,7 +123,7 @@ def filter_queries(query: str, filtered_df: pd.DataFrame) -> pd.DataFrame:
122
 
123
 
124
  def filter_models(
125
- df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
126
  ) -> pd.DataFrame:
127
  # Show all models
128
  if show_deleted:
@@ -133,6 +134,9 @@ def filter_models(
133
  type_emoji = [t[0] for t in type_query]
134
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
135
  filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
 
 
 
136
 
137
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
138
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
 
73
  type_query: list,
74
  precision_query: str,
75
  size_query: list,
76
+ nshot_query: list,
77
  show_deleted: bool,
78
  query: str,
79
  ):
80
  print('1', len(hidden_df))
81
+ filtered_df = filter_models(hidden_df, type_query, size_query, nshot_query, precision_query, show_deleted)
82
  print('2', len(filtered_df))
83
  filtered_df = filter_queries(query, filtered_df)
84
  print('3', len(filtered_df))
 
123
 
124
 
125
  def filter_models(
126
+ df: pd.DataFrame, type_query: list, size_query: list, nshot_query: list, precision_query: list, show_deleted: bool
127
  ) -> pd.DataFrame:
128
  # Show all models
129
  if show_deleted:
 
134
  type_emoji = [t[0] for t in type_query]
135
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
136
  filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
137
+ print(df[AutoEvalColumn.n_shot.name])
138
+ print(nshot_query)
139
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.n_shot.name].isin(nshot_query + ["None"])]
140
 
141
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
142
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")