Michael Shekasta commited on
Commit
a8592c4
Β·
1 Parent(s): 966ba85

adding files

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. requirements.txt +4 -0
  2. .gitattributes +1 -0
  3. README.md +3 -3
  4. app.py +994 -0
  5. m.py +0 -0
  6. pwc_cache/dataset_data/data_10-shot_image_generation_.pkl +3 -0
  7. pwc_cache/dataset_data/data_10-shot_image_generation_Babies.pkl +3 -0
  8. pwc_cache/dataset_data/data_10-shot_image_generation_FQL-Driving.pkl +3 -0
  9. pwc_cache/dataset_data/data_10-shot_image_generation_FlyingThings3D.pkl +3 -0
  10. pwc_cache/dataset_data/data_10-shot_image_generation_MEAD.pkl +3 -0
  11. pwc_cache/dataset_data/data_10-shot_image_generation_Music21.pkl +3 -0
  12. pwc_cache/dataset_data/data_16k_ConceptNet.pkl +3 -0
  13. data_1_Image,_2_2_Stitchi_FQL-Driving.pkl β†’ pwc_cache/dataset_data/data_1_Image,_2_2_Stitchi_FQL-Driving.pkl +0 -0
  14. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_Alibaba_Cluster_Trace.pkl +3 -0
  15. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_COCO-WholeBody.pkl +3 -0
  16. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-E.pkl +3 -0
  17. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-H.pkl +3 -0
  18. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-N.pkl +3 -0
  19. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-OCN-A7M3.pkl +3 -0
  20. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-OCN-RICOH3.pkl +3 -0
  21. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_Human-Art.pkl +3 -0
  22. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_JHMDB_(2D_poses_only).pkl +3 -0
  23. pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_OCHuman.pkl +3 -0
  24. pwc_cache/dataset_data/data_2D_Object_Detection_.pkl +3 -0
  25. pwc_cache/dataset_data/data_2D_Object_Detection_BDD100K_val.pkl +3 -0
  26. pwc_cache/dataset_data/data_2D_Object_Detection_CLCXray.pkl +3 -0
  27. pwc_cache/dataset_data/data_2D_Object_Detection_CeyMo.pkl +3 -0
  28. pwc_cache/dataset_data/data_2D_Object_Detection_Clear_Weather.pkl +3 -0
  29. pwc_cache/dataset_data/data_2D_Object_Detection_DUO.pkl +3 -0
  30. pwc_cache/dataset_data/data_2D_Object_Detection_Dense_Fog.pkl +3 -0
  31. pwc_cache/dataset_data/data_2D_Object_Detection_DroneVehicle.pkl +3 -0
  32. pwc_cache/dataset_data/data_2D_Object_Detection_ETDII_Dataset.pkl +3 -0
  33. pwc_cache/dataset_data/data_2D_Object_Detection_ExDark.pkl +3 -0
  34. pwc_cache/dataset_data/data_2D_Object_Detection_FishEye8K.pkl +3 -0
  35. pwc_cache/dataset_data/data_2D_Object_Detection_RADIATE.pkl +3 -0
  36. pwc_cache/dataset_data/data_2D_Object_Detection_RF100.pkl +3 -0
  37. pwc_cache/dataset_data/data_2D_Object_Detection_RTTS.pkl +3 -0
  38. pwc_cache/dataset_data/data_2D_Object_Detection_RadioGalaxyNET_Dataset.pkl +3 -0
  39. pwc_cache/dataset_data/data_2D_Object_Detection_SARDet-100K.pkl +3 -0
  40. pwc_cache/dataset_data/data_2D_Object_Detection_SCoralDet_Dataset.pkl +3 -0
  41. pwc_cache/dataset_data/data_2D_Object_Detection_TRR360D.pkl +3 -0
  42. pwc_cache/dataset_data/data_2D_Object_Detection_TXL-PBC_a_freely_accessible_labeled_peripheral_blood_cell_dataset.pkl +3 -0
  43. pwc_cache/dataset_data/data_2D_Object_Detection_UAV-PDD2023.pkl +3 -0
  44. pwc_cache/dataset_data/data_2D_Object_Detection_UAVDB.pkl +3 -0
  45. pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_4D-OR.pkl +3 -0
  46. pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_MM-OR.pkl +3 -0
  47. pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_ScanNetV2.pkl +3 -0
  48. pwc_cache/dataset_data/data_2D_Pose_Estimation_300W.pkl +3 -0
  49. pwc_cache/dataset_data/data_2D_Pose_Estimation_Animal_Kingdom.pkl +3 -0
  50. pwc_cache/dataset_data/data_2D_Pose_Estimation_Desert_Locust.pkl +3 -0
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ plotly==6.1.2
2
+ pandas==2.3.0
3
+ tqdm==4.67.1
4
+ datasets==3.6.0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.psd filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
  title: PwCLeaderboardDisplay
3
- emoji: πŸ’»
4
- colorFrom: red
5
- colorTo: gray
6
  sdk: gradio
7
  sdk_version: 5.43.1
8
  app_file: app.py
 
1
  ---
2
  title: PwCLeaderboardDisplay
3
+ emoji: πŸ“šπŸ“šπŸ“š
4
+ colorFrom: gray
5
+ colorTo: pink
6
  sdk: gradio
7
  sdk_version: 5.43.1
8
  app_file: app.py
app.py ADDED
@@ -0,0 +1,994 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import hashlib
2
+ import json
3
+ import pickle
4
+ from datetime import datetime
5
+ from pathlib import Path
6
+
7
+ import gradio as gr
8
+ import pandas as pd
9
+ import plotly.graph_objects as go
10
+ from datasets import load_dataset
11
+ from tqdm import tqdm
12
+
13
+ # Cache configuration
14
+ global CACHE_DIR
15
+ global TASKS_INDEX_FILE
16
+ global TASK_DATA_DIR
17
+ global DATASET_DATA_DIR
18
+ global METRICS_INDEX_FILE
19
+
20
+ CACHE_DIR = Path("./pwc_cache")
21
+ CACHE_DIR.mkdir(exist_ok=True)
22
+
23
+ # Directory structure for disk-based storage
24
+ TASKS_INDEX_FILE = CACHE_DIR / "tasks_index.json" # Small JSON file with task list
25
+ TASK_DATA_DIR = CACHE_DIR / "task_data" # Directory for individual task files
26
+ DATASET_DATA_DIR = CACHE_DIR / "dataset_data" # Directory for individual dataset files
27
+ METRICS_INDEX_FILE = CACHE_DIR / "metrics_index.json" # Metrics metadata
28
+
29
+ # Create directories
30
+ TASK_DATA_DIR.mkdir(exist_ok=True)
31
+ DATASET_DATA_DIR.mkdir(exist_ok=True)
32
+
33
+
34
+ def sanitize_filename(name):
35
+ """Convert a string to a safe filename."""
36
+ # Replace problematic characters with underscores
37
+ safe_name = name.replace('/', '_').replace('\\', '_').replace(':', '_')
38
+ safe_name = safe_name.replace('*', '_').replace('?', '_').replace('"', '_')
39
+ safe_name = safe_name.replace('<', '_').replace('>', '_').replace('|', '_')
40
+ safe_name = safe_name.replace(' ', '_').replace('.', '_')
41
+ # Remove multiple underscores and trim
42
+ safe_name = '_'.join(filter(None, safe_name.split('_')))
43
+ # Limit length to avoid filesystem issues
44
+ if len(safe_name) > 200:
45
+ # If too long, use first 150 chars + hash of full name
46
+ safe_name = safe_name[:150] + '_' + hashlib.md5(name.encode()).hexdigest()[:8]
47
+ return safe_name
48
+
49
+
50
+ def get_task_filename(task):
51
+ """Generate a safe filename for a task."""
52
+ safe_name = sanitize_filename(task)
53
+ return TASK_DATA_DIR / f"task_{safe_name}.pkl"
54
+
55
+
56
+ def get_dataset_filename(task, dataset_name):
57
+ """Generate a safe filename for a dataset."""
58
+ safe_task = sanitize_filename(task)
59
+ safe_dataset = sanitize_filename(dataset_name)
60
+ # Include both task and dataset in filename for clarity
61
+ filename = f"data_{safe_task}_{safe_dataset}.pkl"
62
+ # If combined name is too long, shorten it
63
+ if len(filename) > 255:
64
+ # Use shorter version with hash
65
+ filename = f"data_{safe_task[:50]}_{safe_dataset[:50]}_{hashlib.md5(f'{task}||{dataset_name}'.encode()).hexdigest()[:8]}.pkl"
66
+ return DATASET_DATA_DIR / filename
67
+
68
+
69
+ def cache_exists():
70
+ """Check if cache structure exists."""
71
+ print(f"{TASKS_INDEX_FILE =}")
72
+ print(f"{METRICS_INDEX_FILE =}")
73
+ print(f"{TASKS_INDEX_FILE.exists() =}")
74
+ print(f"{METRICS_INDEX_FILE.exists() =}")
75
+
76
+ return TASKS_INDEX_FILE.exists() and METRICS_INDEX_FILE.exists()
77
+
78
+
79
+ def build_disk_based_cache():
80
+ """Build cache with minimal memory usage - process dataset in streaming fashion."""
81
+
82
+ import os
83
+ print("Michael test", os.path.isdir("./pwc_cache"))
84
+ print("=" * 60)
85
+
86
+
87
+ print("=" * 60)
88
+ print("Building disk-based cache (one-time operation)...")
89
+ print("=" * 60)
90
+
91
+ # Initialize tracking structures (kept small)
92
+ tasks_set = set()
93
+ metrics_index = {}
94
+
95
+ print("\n[1/4] Streaming dataset and building cache...")
96
+
97
+ # Load dataset in streaming mode to save memory
98
+ ds = load_dataset("pwc-archive/evaluation-tables", split="train", streaming=False)
99
+ total_items = len(ds)
100
+
101
+ processed_count = 0
102
+ dataset_count = 0
103
+
104
+ for idx, item in tqdm(enumerate(ds), total=total_items):
105
+ # Progress indicator
106
+
107
+ task = item['task']
108
+ if not task:
109
+ continue
110
+
111
+ tasks_set.add(task)
112
+
113
+ # Load existing task data from disk or create new
114
+ task_file = get_task_filename(task)
115
+ if task_file.exists():
116
+ with open(task_file, 'rb') as f:
117
+ task_data = pickle.load(f)
118
+ else:
119
+ task_data = {
120
+ 'categories': set(),
121
+ 'datasets': set(),
122
+ 'date_range': {'min': None, 'max': None}
123
+ }
124
+
125
+ # Update task data
126
+ if item['categories']:
127
+ task_data['categories'].update(item['categories'])
128
+
129
+ # Process datasets
130
+ if item['datasets']:
131
+ for dataset in item['datasets']:
132
+ if not isinstance(dataset, dict) or 'dataset' not in dataset:
133
+ continue
134
+
135
+ dataset_name = dataset['dataset']
136
+ dataset_file = get_dataset_filename(task, dataset_name)
137
+
138
+ # Skip if already processed
139
+ if dataset_file.exists():
140
+ task_data['datasets'].add(dataset_name)
141
+ continue
142
+
143
+ task_data['datasets'].add(dataset_name)
144
+
145
+ # Process SOTA data
146
+ if 'sota' not in dataset or 'rows' not in dataset['sota']:
147
+ continue
148
+
149
+ models_data = []
150
+ for row in dataset['sota']['rows']:
151
+ if not isinstance(row, dict):
152
+ continue
153
+
154
+ model_name = row.get('model_name', 'Unknown Model')
155
+
156
+ # Extract metrics
157
+ metrics = {}
158
+ if 'metrics' in row and isinstance(row['metrics'], dict):
159
+ for metric_name, metric_value in row['metrics'].items():
160
+ if metric_value is not None:
161
+ metrics[metric_name] = metric_value
162
+ # Track metric metadata
163
+ if metric_name not in metrics_index:
164
+ metrics_index[metric_name] = {
165
+ 'count': 0,
166
+ 'is_lower_better': any(kw in metric_name.lower()
167
+ for kw in ['error', 'loss', 'time', 'cost'])
168
+ }
169
+ metrics_index[metric_name]['count'] += 1
170
+
171
+ # Parse date
172
+ paper_date = row.get('paper_date')
173
+ try:
174
+ if paper_date and isinstance(paper_date, str):
175
+ release_date = pd.to_datetime(paper_date)
176
+ else:
177
+ release_date = pd.to_datetime('2020-01-01')
178
+ except:
179
+ release_date = pd.to_datetime('2020-01-01')
180
+
181
+ # Update date range
182
+ if task_data['date_range']['min'] is None or release_date < task_data['date_range']['min']:
183
+ task_data['date_range']['min'] = release_date
184
+ if task_data['date_range']['max'] is None or release_date > task_data['date_range']['max']:
185
+ task_data['date_range']['max'] = release_date
186
+
187
+ # Build model entry
188
+ model_entry = {
189
+ 'model_name': model_name,
190
+ 'release_date': release_date,
191
+ 'paper_date': row.get('paper_date', ''), # Store raw paper_date for dynamic parsing
192
+ 'paper_url': row.get('paper_url', ''),
193
+ 'paper_title': row.get('paper_title', ''),
194
+ 'code_url': row.get('code_links', [''])[0] if row.get('code_links') else '',
195
+ **metrics
196
+ }
197
+
198
+ models_data.append(model_entry)
199
+
200
+ if models_data:
201
+ df = pd.DataFrame(models_data)
202
+ df = df.sort_values('release_date')
203
+
204
+ # Save dataset to its own file
205
+ with open(dataset_file, 'wb') as f:
206
+ pickle.dump(df, f, protocol=pickle.HIGHEST_PROTOCOL)
207
+
208
+ dataset_count += 1
209
+
210
+ # Clear DataFrame from memory
211
+ del df
212
+ del models_data
213
+
214
+ # Save updated task data back to disk
215
+ with open(task_file, 'wb') as f:
216
+ # Convert sets to lists for serialization
217
+ task_data_to_save = {
218
+ 'categories': sorted(list(task_data['categories'])),
219
+ 'datasets': sorted(list(task_data['datasets'])),
220
+ 'date_range': task_data['date_range']
221
+ }
222
+ pickle.dump(task_data_to_save, f, protocol=pickle.HIGHEST_PROTOCOL)
223
+
224
+ # Clear task data from memory
225
+ del task_data
226
+ processed_count += 1
227
+
228
+ print(f"\nβœ“ Processed {len(tasks_set)} tasks and {dataset_count} datasets")
229
+
230
+ print("\n[2/4] Saving index files...")
231
+
232
+ # Save tasks index (small file)
233
+ tasks_list = sorted(list(tasks_set))
234
+ with open(TASKS_INDEX_FILE, 'w') as f:
235
+ json.dump(tasks_list, f)
236
+ print(f" βœ“ Saved tasks index ({len(tasks_list)} tasks)")
237
+
238
+ # Save metrics index
239
+ with open(METRICS_INDEX_FILE, 'w') as f:
240
+ json.dump(metrics_index, f, indent=2)
241
+ print(f" βœ“ Saved metrics index ({len(metrics_index)} metrics)")
242
+
243
+ print("\n[3/4] Calculating cache statistics...")
244
+
245
+ # Calculate total cache size
246
+ total_size = 0
247
+ for file in TASK_DATA_DIR.glob("*.pkl"):
248
+ total_size += file.stat().st_size
249
+ for file in DATASET_DATA_DIR.glob("*.pkl"):
250
+ total_size += file.stat().st_size
251
+
252
+ print(f" βœ“ Total cache size: {total_size / 1024 / 1024:.1f} MB")
253
+ print(f" βœ“ Task files: {len(list(TASK_DATA_DIR.glob('*.pkl')))}")
254
+ print(f" βœ“ Dataset files: {len(list(DATASET_DATA_DIR.glob('*.pkl')))}")
255
+
256
+ print("\n[4/4] Cache building complete!")
257
+ print("=" * 60)
258
+
259
+ return tasks_list
260
+
261
+
262
+ def load_tasks_index():
263
+ """Load just the task list from disk."""
264
+ with open(TASKS_INDEX_FILE, 'r') as f:
265
+ return json.load(f)
266
+
267
+
268
+ def load_task_data(task):
269
+ """Load data for a specific task from disk."""
270
+ task_file = get_task_filename(task)
271
+ if task_file.exists():
272
+ with open(task_file, 'rb') as f:
273
+ return pickle.load(f)
274
+ return None
275
+
276
+
277
+ def load_dataset_data(task, dataset_name):
278
+ """Load a specific dataset from disk."""
279
+ dataset_file = get_dataset_filename(task, dataset_name)
280
+ if dataset_file.exists():
281
+ with open(dataset_file, 'rb') as f:
282
+ return pickle.load(f)
283
+ return pd.DataFrame()
284
+
285
+
286
+ def load_metrics_index():
287
+ """Load metrics index from disk."""
288
+ if METRICS_INDEX_FILE.exists():
289
+ with open(METRICS_INDEX_FILE, 'r') as f:
290
+ return json.load(f)
291
+ return {}
292
+
293
+ # Initialize - build cache if doesn't exist
294
+ if cache_exists():
295
+ print("Loading task index from disk...")
296
+ TASKS = load_tasks_index()
297
+ print(f"βœ“ Loaded {len(TASKS)} tasks")
298
+ else:
299
+ TASKS = build_disk_based_cache()
300
+
301
+ # Load metrics index once (it's small)
302
+ METRICS_INDEX = load_metrics_index()
303
+
304
+
305
+ # Memory-efficient accessor functions
306
+ def get_tasks():
307
+ """Get all tasks from index."""
308
+ return TASKS
309
+
310
+
311
+ def get_task_data(task):
312
+ """Load task data from disk on-demand."""
313
+ return load_task_data(task)
314
+
315
+
316
+ def get_categories(task):
317
+ """Get categories for a task (loads from disk)."""
318
+ task_data = get_task_data(task)
319
+ return task_data['categories'] if task_data else []
320
+
321
+
322
+ def get_datasets_for_task(task):
323
+ """Get datasets for a task (loads from disk)."""
324
+ task_data = get_task_data(task)
325
+ return task_data['datasets'] if task_data else []
326
+
327
+
328
+ def get_cached_model_data(task, dataset_name):
329
+ """Load dataset from disk on-demand."""
330
+ return load_dataset_data(task, dataset_name)
331
+
332
+
333
+ def parse_paper_date(paper_date, paper_title="", paper_url=""):
334
+ """Parse paper date with improved fallback strategies."""
335
+ import re
336
+
337
+ # Try to parse the raw paper_date if available
338
+ if paper_date and isinstance(paper_date, str) and paper_date.strip():
339
+ try:
340
+ # Try common date formats
341
+ date_formats = [
342
+ '%Y-%m-%d',
343
+ '%Y/%m/%d',
344
+ '%d-%m-%Y',
345
+ '%d/%m/%Y',
346
+ '%Y-%m',
347
+ '%Y/%m',
348
+ '%Y'
349
+ ]
350
+
351
+ for fmt in date_formats:
352
+ try:
353
+ return pd.to_datetime(paper_date.strip(), format=fmt)
354
+ except:
355
+ continue
356
+
357
+ # Try pandas automatic parsing
358
+ return pd.to_datetime(paper_date.strip())
359
+ except:
360
+ pass
361
+
362
+ # Fallback: try to extract year from paper title or URL
363
+ year_pattern = r'\b(19[5-9]\d|20[0-9]\d)\b' # Match 1950-2099
364
+
365
+ # Look for year in paper title
366
+ if paper_title:
367
+ years = re.findall(year_pattern, str(paper_title))
368
+ if years:
369
+ try:
370
+ year = max(years) # Use the latest year found
371
+ return pd.to_datetime(f'{year}-01-01')
372
+ except:
373
+ pass
374
+
375
+ # Look for year in paper URL
376
+ if paper_url:
377
+ years = re.findall(year_pattern, str(paper_url))
378
+ if years:
379
+ try:
380
+ year = max(years) # Use the latest year found
381
+ return pd.to_datetime(f'{year}-01-01')
382
+ except:
383
+ pass
384
+
385
+ # Final fallback: return None instead of a default year
386
+ return None
387
+
388
+
389
+ def get_task_statistics(task):
390
+ """Get statistics about a task."""
391
+ return {}
392
+
393
+
394
+ def create_sota_plot(df, metric):
395
+ """Create a plot showing model performance evolution over time.
396
+
397
+ Args:
398
+ df: DataFrame with model data
399
+ metric: Metric name to plot on y-axis
400
+ """
401
+ if df.empty or metric not in df.columns:
402
+ fig = go.Figure()
403
+ fig.add_annotation(
404
+ text="No data available for this metric",
405
+ xref="paper",
406
+ yref="paper",
407
+ x=0.5,
408
+ y=0.5,
409
+ showarrow=False,
410
+ font=dict(size=20)
411
+ )
412
+ fig.update_layout(
413
+ title="No Data Available",
414
+ height=600,
415
+ plot_bgcolor='white',
416
+ paper_bgcolor='white'
417
+ )
418
+ return fig
419
+
420
+ # Remove rows where the metric is NaN
421
+ df_clean = df.dropna(subset=[metric]).copy()
422
+
423
+ if df_clean.empty:
424
+ fig = go.Figure()
425
+ fig.add_annotation(
426
+ text="No valid data points for this metric",
427
+ xref="paper",
428
+ yref="paper",
429
+ x=0.5,
430
+ y=0.5,
431
+ showarrow=False,
432
+ font=dict(size=20)
433
+ )
434
+ fig.update_layout(
435
+ title="No Data Available",
436
+ height=600,
437
+ plot_bgcolor='white',
438
+ paper_bgcolor='white'
439
+ )
440
+ return fig
441
+
442
+ # Convert metric column to numeric, handling any string values
443
+ try:
444
+ df_clean[metric] = pd.to_numeric(
445
+ df_clean[metric].apply(lambda x: x.strip()[:-1] if isinstance(x, str) and x.strip().endswith("%") else x),
446
+ errors='coerce')
447
+ # Remove any rows that couldn't be converted to numeric
448
+ df_clean = df_clean.dropna(subset=[metric])
449
+
450
+ if df_clean.empty:
451
+ fig = go.Figure()
452
+ fig.add_annotation(
453
+ text=f"No numeric data available for metric: {metric}",
454
+ xref="paper",
455
+ yref="paper",
456
+ x=0.5,
457
+ y=0.5,
458
+ showarrow=False,
459
+ font=dict(size=20)
460
+ )
461
+ fig.update_layout(
462
+ title="No Numeric Data Available",
463
+ height=600,
464
+ plot_bgcolor='white',
465
+ paper_bgcolor='white'
466
+ )
467
+ return fig
468
+
469
+ except Exception as e:
470
+ fig = go.Figure()
471
+ fig.add_annotation(
472
+ text=f"Error processing metric data: {str(e)}",
473
+ xref="paper",
474
+ yref="paper",
475
+ x=0.5,
476
+ y=0.5,
477
+ showarrow=False,
478
+ font=dict(size=16)
479
+ )
480
+ fig.update_layout(
481
+ title="Data Processing Error",
482
+ height=600,
483
+ plot_bgcolor='white',
484
+ paper_bgcolor='white'
485
+ )
486
+ return fig
487
+
488
+ # Recalculate release dates dynamically from raw paper_date if available
489
+ df_processed = df_clean.copy()
490
+ if 'paper_date' in df_processed.columns:
491
+ # Parse dates dynamically using improved logic
492
+ df_processed['dynamic_release_date'] = df_processed.apply(
493
+ lambda row: parse_paper_date(
494
+ row.get('paper_date', ''),
495
+ row.get('paper_title', ''),
496
+ row.get('paper_url', '')
497
+ ), axis=1
498
+ )
499
+ # Use dynamic dates if available, otherwise fallback to original release_date
500
+ df_processed['final_release_date'] = df_processed['dynamic_release_date'].fillna(df_processed['release_date'])
501
+ else:
502
+ # If no paper_date column, use existing release_date
503
+ df_processed['final_release_date'] = df_processed['release_date']
504
+
505
+ # Filter out rows with no valid date
506
+ df_with_dates = df_processed[df_processed['final_release_date'].notna()].copy()
507
+
508
+ if df_with_dates.empty:
509
+ # If no valid dates, return empty plot
510
+ fig = go.Figure()
511
+ fig.add_annotation(
512
+ text="No valid dates available for this dataset",
513
+ xref="paper",
514
+ yref="paper",
515
+ x=0.5,
516
+ y=0.5,
517
+ showarrow=False,
518
+ font=dict(size=20)
519
+ )
520
+ fig.update_layout(
521
+ title="No Date Data Available",
522
+ height=600,
523
+ plot_bgcolor='white',
524
+ paper_bgcolor='white'
525
+ )
526
+ return fig
527
+
528
+ # Sort by final release date
529
+ df_sorted = df_with_dates.sort_values('final_release_date').copy()
530
+
531
+ # Check if metric is lower-better
532
+ is_lower_better = False
533
+ if metric in METRICS_INDEX:
534
+ is_lower_better = METRICS_INDEX[metric].get('is_lower_better', False)
535
+ else:
536
+ is_lower_better = any(keyword in metric.lower() for keyword in ['error', 'loss', 'time', 'cost'])
537
+
538
+ if is_lower_better:
539
+ df_sorted['cumulative_best'] = df_sorted[metric].cummin()
540
+ df_sorted['is_sota'] = df_sorted[metric] == df_sorted['cumulative_best']
541
+ else:
542
+ df_sorted['cumulative_best'] = df_sorted[metric].cummax()
543
+ df_sorted['is_sota'] = df_sorted[metric] == df_sorted['cumulative_best']
544
+
545
+ # Get SOTA models
546
+ sota_df = df_sorted[df_sorted['is_sota']].copy()
547
+
548
+ # Use the dynamically calculated dates for x-axis
549
+ x_values = df_sorted['final_release_date']
550
+ x_axis_title = 'Release Date'
551
+
552
+ # Create the plot
553
+ fig = go.Figure()
554
+
555
+ # Add all models as scatter points
556
+ fig.add_trace(go.Scatter(
557
+ x=x_values,
558
+ y=df_sorted[metric],
559
+ mode='markers',
560
+ name='All models',
561
+ marker=dict(
562
+ color=['#00CED1' if is_sota else 'lightgray'
563
+ for is_sota in df_sorted['is_sota']],
564
+ size=8,
565
+ opacity=0.7
566
+ ),
567
+ text=df_sorted['model_name'],
568
+ customdata=df_sorted[['paper_title', 'paper_url', 'code_url']],
569
+ hovertemplate='<b>%{text}</b><br>' +
570
+ f'{metric}: %{{y:.4f}}<br>' +
571
+ 'Date: %{x}<br>' +
572
+ 'Paper: %{customdata[0]}<br>' +
573
+ '<extra></extra>'
574
+ ))
575
+
576
+ # Add SOTA line
577
+ fig.add_trace(go.Scatter(
578
+ x=x_values,
579
+ y=df_sorted['cumulative_best'],
580
+ mode='lines',
581
+ name=f'SOTA (cumulative {"min" if is_lower_better else "max"})',
582
+ line=dict(color='#00CED1', width=2, dash='solid'),
583
+ hovertemplate=f'SOTA {metric}: %{{y:.4f}}<br>{x_axis_title}: %{{x}}<extra></extra>'
584
+ ))
585
+
586
+ # Add labels for SOTA models
587
+ if not sota_df.empty:
588
+ # Calculate dynamic offset based on data range
589
+ y_range = df_sorted[metric].max() - df_sorted[metric].min()
590
+
591
+ # Use a percentage of the range for offset, with minimum and maximum bounds
592
+ if y_range > 0:
593
+ base_offset = y_range * 0.03 # 3% of the data range
594
+ # Ensure minimum offset for readability and maximum to prevent excessive spacing
595
+ label_offset = max(y_range * 0.01, min(base_offset, y_range * 0.08))
596
+ else:
597
+ # Fallback for when all values are the same
598
+ label_offset = 1
599
+
600
+ # Track label positions to prevent overlaps
601
+ previous_labels = []
602
+ # For date-based x-axis, use date separation
603
+ try:
604
+ date_range = (df_sorted['final_release_date'].max() - df_sorted['final_release_date'].min()).days
605
+ min_separation = max(30, date_range * 0.05) # Minimum 30 days or 5% of range
606
+ except (TypeError, AttributeError):
607
+ # Fallback if date calculation fails
608
+ min_separation = 30
609
+
610
+ for i, (_, row) in enumerate(sota_df.iterrows()):
611
+ # Determine base label position based on metric type
612
+ if is_lower_better:
613
+ # For lower-better metrics, place label above the point (negative ay)
614
+ base_ay_offset = -label_offset
615
+ base_yshift = -8
616
+ alternate_multiplier = -1
617
+ else:
618
+ # For higher-better metrics, place label below the point (positive ay)
619
+ base_ay_offset = label_offset
620
+ base_yshift = 8
621
+ alternate_multiplier = 1
622
+
623
+ # Check for collision with previous labels
624
+ current_x = row['final_release_date']
625
+ collision_detected = False
626
+
627
+ for prev_x, prev_ay in previous_labels:
628
+ try:
629
+ x_diff = abs((current_x - prev_x).days)
630
+ if x_diff < min_separation:
631
+ collision_detected = True
632
+ break
633
+ except (TypeError, AttributeError):
634
+ # Skip collision detection if calculation fails
635
+ continue
636
+
637
+ # Adjust position if collision detected
638
+ if collision_detected:
639
+ # Alternate the label position (above/below) to avoid overlap
640
+ ay_offset = base_ay_offset + (alternate_multiplier * label_offset * 0.7 * (i % 2))
641
+ yshift = base_yshift + (alternate_multiplier * 12 * (i % 2))
642
+ else:
643
+ ay_offset = base_ay_offset
644
+ yshift = base_yshift
645
+
646
+ # Add the annotation
647
+ fig.add_annotation(
648
+ x=current_x,
649
+ y=row[metric],
650
+ text=row['model_name'][:25] + '...' if len(row['model_name']) > 25 else row['model_name'],
651
+ showarrow=True,
652
+ arrowhead=2,
653
+ arrowsize=1,
654
+ arrowwidth=1,
655
+ arrowcolor='#00CED1', # Match the SOTA line color
656
+ ax=0,
657
+ ay=ay_offset, # Dynamic offset based on data range and collision detection
658
+ yshift=yshift, # Fine-tune positioning
659
+ font=dict(size=8, color='#333333'),
660
+ bgcolor='rgba(255, 255, 255, 0.9)', # Semi-transparent background
661
+ borderwidth=0 # Remove border
662
+ )
663
+
664
+ # Track this label position
665
+ previous_labels.append((current_x, ay_offset))
666
+
667
+ # Update layout
668
+ fig.update_layout(
669
+ title=f'SOTA Evolution: {metric}',
670
+ xaxis_title=x_axis_title,
671
+ yaxis_title=metric,
672
+ xaxis=dict(showgrid=True, gridcolor='lightgray'),
673
+ yaxis=dict(showgrid=True, gridcolor='lightgray'),
674
+ plot_bgcolor='white',
675
+ paper_bgcolor='white',
676
+ height=600,
677
+ legend=dict(yanchor="top", y=0.99, xanchor="left", x=0.01),
678
+ hovermode='closest'
679
+ )
680
+
681
+ # Clear the DataFrame from memory after plotting
682
+ del df_clean
683
+ del df_sorted
684
+ del sota_df
685
+
686
+ return fig
687
+
688
+
689
+ # Gradio interface
690
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
691
+ gr.Markdown("# πŸ“Š Papers with Code - SOTA Evolution Visualizer")
692
+ gr.Markdown(
693
+ "Navigate through ML tasks and datasets to visualize the evolution of state-of-the-art models over time.")
694
+ gr.Markdown("*Optimized for low memory usage - data is loaded on-demand from disk*")
695
+
696
+ # Status
697
+ with gr.Row():
698
+ gr.Markdown(f"""
699
+ <div style="background-color: #f0f9ff; border-left: 4px solid #00CED1; padding: 10px; margin: 10px 0;">
700
+ <b>πŸ’Ύ Disk-Based Storage Active</b><br>
701
+ β€’ <b>{len(TASKS)}</b> tasks indexed<br>
702
+ β€’ <b>{len(METRICS_INDEX)}</b> unique metrics tracked<br>
703
+ β€’ Data loaded on-demand to minimize RAM usage
704
+ </div>
705
+ """)
706
+
707
+ # State variables
708
+ current_df = gr.State(pd.DataFrame())
709
+ current_task = gr.State(None)
710
+
711
+ # Navigation dropdowns
712
+ with gr.Row():
713
+ task_dropdown = gr.Dropdown(
714
+ choices=get_tasks(),
715
+ label="Select Task",
716
+ interactive=True
717
+ )
718
+ category_dropdown = gr.Dropdown(
719
+ choices=[],
720
+ label="Categories (info only)",
721
+ interactive=False
722
+ )
723
+
724
+ with gr.Row():
725
+ dataset_dropdown = gr.Dropdown(
726
+ choices=[],
727
+ label="Select Dataset",
728
+ interactive=True
729
+ )
730
+ metric_dropdown = gr.Dropdown(
731
+ choices=[],
732
+ label="Select Metric",
733
+ interactive=True
734
+ )
735
+
736
+ # Info display
737
+ info_text = gr.Markdown("πŸ‘† Please select a task to begin")
738
+
739
+ # Plot
740
+ plot = gr.Plot(label="SOTA Evolution")
741
+
742
+ # Data display
743
+ with gr.Row():
744
+ show_data_btn = gr.Button("πŸ“‹ Show/Hide Model Data")
745
+ export_btn = gr.Button("πŸ’Ύ Export Current Data (CSV)")
746
+ clear_memory_btn = gr.Button("🧹 Clear Memory", variant="secondary")
747
+
748
+ df_display = gr.Dataframe(
749
+ label="Model Data",
750
+ visible=False
751
+ )
752
+
753
+
754
+ # Update functions
755
+ def update_task_selection(task):
756
+ """Update dropdowns when task is selected."""
757
+ if not task:
758
+ return [], [], [], "πŸ‘† Please select a task to begin", pd.DataFrame(), None, None
759
+
760
+ # Load task data from disk
761
+ categories = get_categories(task)
762
+ datasets = get_datasets_for_task(task)
763
+
764
+ info = f"### πŸ“‚ **Task:** {task}\n"
765
+ if categories:
766
+ info += f"- **Categories:** {', '.join(categories[:3])}{'...' if len(categories) > 3 else ''} ({len(categories)} total)\n"
767
+
768
+ return (
769
+ gr.Dropdown(choices=categories, value=categories[0] if categories else None),
770
+ gr.Dropdown(choices=datasets, value=None),
771
+ gr.Dropdown(choices=[], value=None),
772
+ info,
773
+ pd.DataFrame(),
774
+ None,
775
+ task # Store current task
776
+ )
777
+
778
+
779
+ def update_dataset_selection(task, dataset_name):
780
+ """Update when dataset is selected - loads from disk."""
781
+ if not task or not dataset_name:
782
+ return [], "", pd.DataFrame(), None
783
+
784
+ # Load dataset from disk
785
+ df = get_cached_model_data(task, dataset_name)
786
+
787
+ if df.empty:
788
+ return [], f"⚠️ No models found for dataset: {dataset_name}", df, None
789
+
790
+ # Get metric columns
791
+ exclude_cols = ['model_name', 'release_date', 'paper_date', 'paper_url', 'paper_title', 'code_url']
792
+ metric_cols = [col for col in df.columns if col not in exclude_cols]
793
+
794
+ info = f"### πŸ“Š **Dataset:** {dataset_name}\n"
795
+ info += f"- **Models:** {len(df)} models\n"
796
+ info += f"- **Metrics:** {len(metric_cols)} metrics available\n"
797
+ if not df.empty:
798
+ info += f"- **Date Range:** {df['release_date'].min().strftime('%Y-%m-%d')} to {df['release_date'].max().strftime('%Y-%m-%d')}\n"
799
+
800
+ if metric_cols:
801
+ info += f"- **Available Metrics:** {', '.join(metric_cols[:5])}{'...' if len(metric_cols) > 5 else ''}"
802
+
803
+ return (
804
+ gr.Dropdown(choices=metric_cols, value=metric_cols[0] if metric_cols else None),
805
+ info,
806
+ df,
807
+ None
808
+ )
809
+
810
+
811
+ def update_plot(df, metric):
812
+ """Update plot when metric is selected."""
813
+ if df.empty or not metric:
814
+ return None
815
+ plot_result = create_sota_plot(df, metric)
816
+ return plot_result
817
+
818
+
819
+ def toggle_dataframe(df):
820
+ """Toggle dataframe visibility."""
821
+ if df.empty:
822
+ return gr.Dataframe(value=pd.DataFrame(), visible=False)
823
+ # Show relevant columns
824
+ display_cols = ['model_name', 'release_date'] + [col for col in df.columns
825
+ if col not in ['model_name', 'release_date', 'paper_date',
826
+ 'paper_url',
827
+ 'paper_title', 'code_url']]
828
+ display_df = df[display_cols].copy()
829
+ display_df['release_date'] = display_df['release_date'].dt.strftime('%Y-%m-%d')
830
+ return gr.Dataframe(value=display_df, visible=True)
831
+
832
+
833
+ def export_data(df):
834
+ """Export current dataframe to CSV."""
835
+ if df.empty:
836
+ return "⚠️ No data to export"
837
+
838
+ filename = f"sota_export_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv"
839
+ df.to_csv(filename, index=False)
840
+ return f"βœ… Data exported to {filename} ({len(df)} models)"
841
+
842
+
843
+ def clear_memory():
844
+ """Clear memory by forcing garbage collection."""
845
+ import gc
846
+ gc.collect()
847
+ return "βœ… Memory cleared"
848
+
849
+
850
+ # Event handlers
851
+ task_dropdown.change(
852
+ fn=update_task_selection,
853
+ inputs=task_dropdown,
854
+ outputs=[category_dropdown, dataset_dropdown,
855
+ metric_dropdown, info_text, current_df, plot, current_task]
856
+ )
857
+
858
+ dataset_dropdown.change(
859
+ fn=update_dataset_selection,
860
+ inputs=[task_dropdown, dataset_dropdown],
861
+ outputs=[metric_dropdown, info_text, current_df, plot]
862
+ )
863
+
864
+ metric_dropdown.change(
865
+ fn=update_plot,
866
+ inputs=[current_df, metric_dropdown],
867
+ outputs=plot
868
+ )
869
+
870
+ show_data_btn.click(
871
+ fn=toggle_dataframe,
872
+ inputs=current_df,
873
+ outputs=df_display
874
+ )
875
+
876
+ export_btn.click(
877
+ fn=export_data,
878
+ inputs=current_df,
879
+ outputs=info_text
880
+ )
881
+
882
+ clear_memory_btn.click(
883
+ fn=clear_memory,
884
+ inputs=[],
885
+ outputs=info_text
886
+ )
887
+
888
+ gr.Markdown("""
889
+ ---
890
+ ### πŸ“– How to Use
891
+ 1. **Select a Task** from the first dropdown
892
+ 2. **Select a Dataset** to analyze
893
+ 3. **Select a Metric** to visualize
894
+ 4. The plot shows SOTA model evolution over time with dynamically calculated dates
895
+
896
+ ### πŸ’Ύ Memory Optimization
897
+ - Data is stored on disk and loaded on-demand
898
+ - Only the current task and dataset are kept in memory
899
+ - Use "Clear Memory" button if needed
900
+ - Infinite disk space is utilized for permanent caching
901
+
902
+ ### 🎨 Plot Features
903
+ - **πŸ”΅ Cyan dots**: SOTA models when released
904
+ - **βšͺ Gray dots**: Other models
905
+ - **πŸ“ˆ Cyan line**: SOTA progression
906
+ - **πŸ” Hover**: View model details
907
+ - **🏷️ Smart Labels**: SOTA model labels positioned close to the line with intelligent collision detection
908
+ """)
909
+
910
+
911
+ def test_sota_label_positioning():
912
+ """Test function to validate SOTA label positioning improvements."""
913
+ print("πŸ§ͺ Testing SOTA label positioning...")
914
+
915
+ # Create sample data for testing
916
+ import pandas as pd
917
+ from datetime import datetime
918
+
919
+ # Test data with different metric types (including all required columns)
920
+ test_data = {
921
+ 'model_name': ['Model A', 'Model B', 'Model C', 'Model D'],
922
+ 'release_date': [
923
+ datetime(2020, 1, 1),
924
+ datetime(2020, 6, 1),
925
+ datetime(2021, 1, 1),
926
+ datetime(2021, 6, 1)
927
+ ],
928
+ 'paper_title': ['Paper A', 'Paper B', 'Paper C', 'Paper D'],
929
+ 'paper_url': ['http://example.com/a', 'http://example.com/b', 'http://example.com/c', 'http://example.com/d'],
930
+ 'code_url': ['http://github.com/a', 'http://github.com/b', 'http://github.com/c', 'http://github.com/d'],
931
+ 'accuracy': [0.85, 0.87, 0.90, 0.92], # Higher-better metric
932
+ 'error_rate': [0.15, 0.13, 0.10, 0.08] # Lower-better metric
933
+ }
934
+
935
+ df_test = pd.DataFrame(test_data)
936
+
937
+ # Test with higher-better metric (accuracy)
938
+ print(" Testing with higher-better metric (accuracy)...")
939
+ try:
940
+ fig1 = create_sota_plot(df_test, 'accuracy')
941
+ print(" βœ… Higher-better metric test passed")
942
+ except Exception as e:
943
+ print(f" ❌ Higher-better metric test failed: {e}")
944
+
945
+ # Test with lower-better metric (error_rate)
946
+ print(" Testing with lower-better metric (error_rate)...")
947
+ try:
948
+ fig2 = create_sota_plot(df_test, 'error_rate')
949
+ print(" βœ… Lower-better metric test passed")
950
+ except Exception as e:
951
+ print(f" ❌ Lower-better metric test failed: {e}")
952
+
953
+ # Test with empty data
954
+ print(" Testing with empty dataframe...")
955
+ try:
956
+ fig3 = create_sota_plot(pd.DataFrame(), 'test_metric')
957
+ print(" βœ… Empty data test passed")
958
+ except Exception as e:
959
+ print(f" ❌ Empty data test failed: {e}")
960
+
961
+ # Test with string metric data (should handle gracefully)
962
+ print(" Testing with string metric data...")
963
+ try:
964
+ df_test_string = df_test.copy()
965
+ df_test_string['string_metric'] = ['low', 'medium', 'high', 'very_high']
966
+ fig4 = create_sota_plot(df_test_string, 'string_metric')
967
+ print(" βœ… String metric test passed (handled gracefully)")
968
+ except Exception as e:
969
+ print(f" ❌ String metric test failed: {e}")
970
+
971
+ # Test with mixed numeric/string data
972
+ print(" Testing with mixed data types...")
973
+ try:
974
+ df_test_mixed = df_test.copy()
975
+ df_test_mixed['mixed_metric'] = [0.85, 'N/A', 0.90, 0.92]
976
+ fig5 = create_sota_plot(df_test_mixed, 'mixed_metric')
977
+ print(" βœ… Mixed data test passed")
978
+ except Exception as e:
979
+ print(f" ❌ Mixed data test failed: {e}")
980
+
981
+ # Test with paper_date parsing
982
+ print(" Testing with paper_date column...")
983
+ try:
984
+ df_test_dates = df_test.copy()
985
+ df_test_dates['paper_date'] = ['2015-03-15', '2018-invalid', '2021-12-01', '2022']
986
+ fig6 = create_sota_plot(df_test_dates, 'accuracy')
987
+ print(" βœ… Paper date parsing test passed")
988
+ except Exception as e:
989
+ print(f" ❌ Paper date parsing test failed: {e}")
990
+
991
+ print("πŸŽ‰ SOTA label positioning tests completed!")
992
+ return True
993
+
994
+ demo.launch()
m.py DELETED
File without changes
pwc_cache/dataset_data/data_10-shot_image_generation_.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34effa6d3c2636d2dced562fa28b650a6c1b3530355e12b53c8c0198c2d51d56
3
+ size 1413
pwc_cache/dataset_data/data_10-shot_image_generation_Babies.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cee3820a3ecfcd63b69bea3e6ab0d41e73b79b73664e32283a549a800e4506f7
3
+ size 2394
pwc_cache/dataset_data/data_10-shot_image_generation_FQL-Driving.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fc9905add6f06f833245cd94c024d22f56290416090687dc05363796ac36bce
3
+ size 1341
pwc_cache/dataset_data/data_10-shot_image_generation_FlyingThings3D.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e75027dce6800e14ef1b881a976bb681212924f820b08338251f44f08201590
3
+ size 1215
pwc_cache/dataset_data/data_10-shot_image_generation_MEAD.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:107a812c403c99deefbd1b0f7c261ad3ce4e48acb7e5b311830cc605e96a0ebf
3
+ size 1335
pwc_cache/dataset_data/data_10-shot_image_generation_Music21.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cca6bca5ef31275adab11e82285971c64ae1bf433cfd945e670d92026ab6c06a
3
+ size 1234
pwc_cache/dataset_data/data_16k_ConceptNet.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:699c069dbc270a1260d0b19cea65586b615200251e48d9a9e0a4c498fa54f5da
3
+ size 1219
data_1_Image,_2_2_Stitchi_FQL-Driving.pkl β†’ pwc_cache/dataset_data/data_1_Image,_2_2_Stitchi_FQL-Driving.pkl RENAMED
File without changes
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_Alibaba_Cluster_Trace.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd5516175dfffa5ca7920e4c24231e2699d6f9d5136258e74b79344ad5e8c345
3
+ size 1297
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_COCO-WholeBody.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2e9edb367a4b3d8348888c53f32e1d4325ef0f0d7bd44c4c00ec12289fdc7ce
3
+ size 4908
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-E.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a6120210dd212973c85f7f807e96ae105404b6c988b647f31c2d89fc72f4a79
3
+ size 1341
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-H.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42dd25d5dce87a1668e7c5d019d3fd5a8a73e55e3797d551099ac2a21d9a0bd9
3
+ size 1342
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-LL-N.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82b22f28d3d2dd1ce0cd5e111671b934b0c5089fa976688e5792ed29049e0702
3
+ size 1342
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-OCN-A7M3.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4adc68b6b788213431bc6d5bae2d89718d797515be6b4d221805c035eeda51ef
3
+ size 1342
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_ExLPose-OCN-RICOH3.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17ad4c6a5bd99cc6f197359416b40d0ae4190243fc8d62bff2e7a45404635361
3
+ size 1342
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_Human-Art.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e65e0f8668677d0bb02a3206dd0c447d5c4648e33a950dd7ceed2eecfbc0cb9
3
+ size 3529
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_JHMDB_(2D_poses_only).pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78101631e3029d2d0f03401732b576f5cdeb598b1be7d77db79e4b7c274adc6e
3
+ size 2133
pwc_cache/dataset_data/data_2D_Human_Pose_Estimation_OCHuman.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58932a9a8333ef32f8db91b3b58587bb13ada01b1ca9cedf90549e6b8556c512
3
+ size 3697
pwc_cache/dataset_data/data_2D_Object_Detection_.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e514a1160eca22dd3706ae151eea63459ca1dbcc9fc059915057096ced4c1e3
3
+ size 1285
pwc_cache/dataset_data/data_2D_Object_Detection_BDD100K_val.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44b21c8f7d4157ae46bd0b382cd82f9750c114929eeac483747f9ed781d7004b
3
+ size 1345
pwc_cache/dataset_data/data_2D_Object_Detection_CLCXray.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8e8ba7c53e8006b4e13338da5ee55f5bbcd01693270dba492ffb9f61a87fcad
3
+ size 1357
pwc_cache/dataset_data/data_2D_Object_Detection_CeyMo.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c3c18763cdfab772acb50ba8906db3a38f50c8cd31f88dacfca36ee64ce3c57
3
+ size 2188
pwc_cache/dataset_data/data_2D_Object_Detection_Clear_Weather.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f717ff3d6383f341747beeb1e4a701a964b7aaa8e4470a171f471137da55fab
3
+ size 1609
pwc_cache/dataset_data/data_2D_Object_Detection_DUO.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f53e61ac321236c0aa1b1c6c001db86b1e7a0ba446284bdb72a3790f010dde0a
3
+ size 1375
pwc_cache/dataset_data/data_2D_Object_Detection_Dense_Fog.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:667dea97f3ab2b83ac36e1f8e53dc6f785d642c6cbbef30603b8132ef9d2c0ad
3
+ size 1703
pwc_cache/dataset_data/data_2D_Object_Detection_DroneVehicle.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02ced4ac07e5adaf84cc127fdb5f6621f29b944e675f0f486fa41b03df2ee3ce
3
+ size 3252
pwc_cache/dataset_data/data_2D_Object_Detection_ETDII_Dataset.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e1c35242213e300e64e7f9d589e2e7c20737bbf292e16ad52e71e0325f6eadf
3
+ size 1372
pwc_cache/dataset_data/data_2D_Object_Detection_ExDark.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d86dd2eca8283d0ff0be3bd7f7ba41950bf42fdbdd03d13638992fe03d901619
3
+ size 1745
pwc_cache/dataset_data/data_2D_Object_Detection_FishEye8K.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96fe1af52c13e18a2ac4195554a06de7b8000f32df41c4e96a883ef5fce53354
3
+ size 1319
pwc_cache/dataset_data/data_2D_Object_Detection_RADIATE.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85195b758cf0344f08467fc86d790db69111e03d3300035867f7d111d63868f4
3
+ size 1362
pwc_cache/dataset_data/data_2D_Object_Detection_RF100.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48a287432d6c9d6acf69e1d62aba80c6a8de219176a1fbc9c46632214bbbb908
3
+ size 1279
pwc_cache/dataset_data/data_2D_Object_Detection_RTTS.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94877ba73d7cc8efb731c637589aeabe772071a78abf5b9b8b0656b4d2b72faa
3
+ size 1310
pwc_cache/dataset_data/data_2D_Object_Detection_RadioGalaxyNET_Dataset.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2804fef70c216967323de8fb4556b507aaeca0ebf388cc4f1493ebe541802205
3
+ size 1415
pwc_cache/dataset_data/data_2D_Object_Detection_SARDet-100K.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e34412ffc634a11a4bccc82e678d14d289a07ccc4eacc675499d32cbc1115a
3
+ size 4484
pwc_cache/dataset_data/data_2D_Object_Detection_SCoralDet_Dataset.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6455f7e5f73b2cbff9f5128c9901891c4c04b149aa0975c9febdcc048dfa29af
3
+ size 1868
pwc_cache/dataset_data/data_2D_Object_Detection_TRR360D.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:594cd89b0b41154ddb5b81a3b8918aa4cdcd5b121003d7b4b03b42e1072c6de7
3
+ size 1313
pwc_cache/dataset_data/data_2D_Object_Detection_TXL-PBC_a_freely_accessible_labeled_peripheral_blood_cell_dataset.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04e71f4aa1c4e09361ea69086285efb896dcf5eed4eb89749733c63dfc5a6853
3
+ size 2216
pwc_cache/dataset_data/data_2D_Object_Detection_UAV-PDD2023.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e89aa91bc4102576ceabee52e7ab6e254e08616fe0ac3213f826dd8b79b80d28
3
+ size 1353
pwc_cache/dataset_data/data_2D_Object_Detection_UAVDB.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c7fcf5a679237be1c2221cb7cf95b67dc336c80b6c30c7bb21daedc466ae96c
3
+ size 1309
pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_4D-OR.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d5f9186b9dd3cf9cee891c97ecf69db4444a7a7c5971f9e6bcbbfce545157bf
3
+ size 1350
pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_MM-OR.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d049b3f8cadc4ec12db2b45db9d8e8cdfb594d9a8cb4bd5a93c9e5816311ca76
3
+ size 1350
pwc_cache/dataset_data/data_2D_Panoptic_Segmentation_ScanNetV2.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1336890de3fe6424b2301402cd6d621dca596a777bf712f5717ef2de8f433c1a
3
+ size 1333
pwc_cache/dataset_data/data_2D_Pose_Estimation_300W.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:717dee7c776a73ce687c5515d13795e79df5f5f84a81e00bb1eff708e48540e7
3
+ size 1289
pwc_cache/dataset_data/data_2D_Pose_Estimation_Animal_Kingdom.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1807940d4ac8c37fd73323b5f96d7f37e7e5efb2126b8be74d828671e702c976
3
+ size 1315
pwc_cache/dataset_data/data_2D_Pose_Estimation_Desert_Locust.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e49dd44d5c4812f3e4aa622873932f0769080269c18b50cb1a212f329c23216
3
+ size 1289