g8a9 commited on
Commit
9a7f023
1 Parent(s): 1ea444d

add logging utils

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -78,8 +78,20 @@ def _populate_components(show_common_langs):
78
 
79
  if show_common_langs:
80
  common_langs = get_common_langs()
 
81
  results = results[results["Language"].isin(common_langs)]
82
 
 
 
 
 
 
 
 
 
 
 
 
83
  models_with_nan = results[results.isna().any(axis=1)]["Model"].unique().tolist()
84
  logger.info(f"Models with NaN values: {models_with_nan}")
85
  results = results[~results["Model"].isin(models_with_nan)]
 
78
 
79
  if show_common_langs:
80
  common_langs = get_common_langs()
81
+ logger.info(f"Common langs: {common_langs}")
82
  results = results[results["Language"].isin(common_langs)]
83
 
84
+ missing_langs = (
85
+ results[results.isna().any(axis=1)]
86
+ .groupby("Model")["Language"]
87
+ .apply(list)
88
+ .to_dict()
89
+ )
90
+ for model, langs in missing_langs.items():
91
+ logger.info(
92
+ f"Model {model} is missing results for languages: {', '.join(langs)}"
93
+ )
94
+
95
  models_with_nan = results[results.isna().any(axis=1)]["Model"].unique().tolist()
96
  logger.info(f"Models with NaN values: {models_with_nan}")
97
  results = results[~results["Model"].isin(models_with_nan)]