akera commited on
Commit
8003b5b
·
verified ·
1 Parent(s): a0e00d8

Update src/test_set.py

Browse files
Files changed (1) hide show
  1. src/test_set.py +9 -2
src/test_set.py CHANGED
@@ -68,24 +68,31 @@ def generate_test_set(max_samples_per_pair: int = MAX_TEST_SAMPLES) -> pd.DataFr
68
 
69
  return test_df
70
 
 
71
  def get_public_test_set() -> pd.DataFrame:
72
  """Get public test set (sources only, no targets)."""
73
 
74
  try:
75
  # Try to load existing test set
 
76
  dataset = load_dataset(TEST_SET_DATASET, split='train')
77
  test_df = dataset.to_pandas()
78
  print(f"Loaded existing test set with {len(test_df)} samples")
79
 
80
  except Exception as e:
81
  print(f"Could not load existing test set: {e}")
82
- print("Generating new test set...")
83
 
84
  # Generate new test set
85
  test_df = generate_test_set()
86
 
87
  # Save complete test set (with targets) privately
88
- save_complete_test_set(test_df)
 
 
 
 
 
89
 
90
  # Return public version (without targets)
91
  public_columns = [
 
68
 
69
  return test_df
70
 
71
+
72
  def get_public_test_set() -> pd.DataFrame:
73
  """Get public test set (sources only, no targets)."""
74
 
75
  try:
76
  # Try to load existing test set
77
+ print(f"Loading test set from: {TEST_SET_DATASET}")
78
  dataset = load_dataset(TEST_SET_DATASET, split='train')
79
  test_df = dataset.to_pandas()
80
  print(f"Loaded existing test set with {len(test_df)} samples")
81
 
82
  except Exception as e:
83
  print(f"Could not load existing test set: {e}")
84
+ print("This is expected for first run. Generating new test set...")
85
 
86
  # Generate new test set
87
  test_df = generate_test_set()
88
 
89
  # Save complete test set (with targets) privately
90
+ print("Saving test set for future use...")
91
+ try:
92
+ save_complete_test_set(test_df)
93
+ except Exception as save_error:
94
+ print(f"Warning: Could not save test set: {save_error}")
95
+ print("Continuing with generated test set...")
96
 
97
  # Return public version (without targets)
98
  public_columns = [