loodvanniekerkginkgo commited on
Commit
c6d6e01
·
1 Parent(s): d6a0c44

Fixed the validation message

Browse files
Files changed (1) hide show
  1. validation.py +8 -1
validation.py CHANGED
@@ -236,7 +236,14 @@ def validate_dataframe(df: pd.DataFrame, submission_type: str = "GDPa1") -> None
236
  results_df = evaluate(predictions_df=df, target_df=df_gdpa1, dataset_name=submission_type)
237
  # Check that the Spearman correlations are not too high
238
  if results_df["spearman"].max() > 0.9:
239
- raise gr.Error(f"❌ Your submission shows abnormally high correlations (>0.9) on the public set. Please check that you're not overfitting on the public set and are using cross-validation if training a new model.\nIf you think this is a mistake, please contact [email protected].", duration=30)
 
 
 
 
 
 
 
240
 
241
 
242
  def validate_csv_file(file_content: str, submission_type: str = "GDPa1") -> None:
 
236
  results_df = evaluate(predictions_df=df, target_df=df_gdpa1, dataset_name=submission_type)
237
  # Check that the Spearman correlations are not too high
238
  if results_df["spearman"].max() > 0.9:
239
+ raise gr.Error(
240
+ message="⚠️ Your submission shows abnormally high correlations (>0.9) on the public set. "
241
+ "Please check that you're not overfitting/don't have data leakage on the public set and are using cross-validation if training a new model.\n"
242
+ "This will result in a better model for eventually submitting to the heldout test set.\n"
243
+ "If you think this is a mistake, please contact [email protected].",
244
+ duration=30,
245
+ title="Data Leakage Warning",
246
+ )
247
 
248
 
249
  def validate_csv_file(file_content: str, submission_type: str = "GDPa1") -> None: