-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_progress.py
More file actions
71 lines (58 loc) · 2.23 KB
/
check_progress.py
File metadata and controls
71 lines (58 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python
"""Script to check model comparison progress"""
import json
import os
from pathlib import Path
import time
def find_latest_results():
"""Find the latest results directory"""
reports_dir = Path("reports/model_comparison")
if not reports_dir.exists():
return None
dirs = sorted([d for d in reports_dir.iterdir() if d.is_dir()], reverse=True)
for d in dirs:
results_file = d / "results.json"
if results_file.exists():
return results_file
return None
def main():
print("=" * 70)
print("MODEL COMPARISON PROGRESS CHECKER")
print("=" * 70)
results_file = find_latest_results()
if not results_file:
print("No results found yet!")
return
print(f"Results directory: {results_file.parent.name}")
print()
with open(results_file) as f:
results = json.load(f)
total = 5670
completed = len(results)
percent = (completed / total) * 100
print(f"Progress: {completed}/{total} ({percent:.2f}%)")
if completed > 0:
last = results[-1]
print(f"\nLast completed experiment:")
print(f" Dataset: {last['dataset']}")
print(f" Model: {last['model_type']}")
print(f" Hyperparams: layers={last['hyperparameters']['num_layers']}, "
f"hidden={last['hyperparameters']['hidden_dim']}, "
f"lr={last['hyperparameters']['learning_rate']}, "
f"dropout={last['hyperparameters']['dropout']}")
print(f" Head dims: {last['hyperparameters']['head_dims']}")
print(f" Training time: {last['train_time']:.1f}s")
if last.get('is_classification'):
print(f" Test AUC: {last['test_metrics']['auc_roc']:.4f}")
else:
print(f" Test RMSE: {last['test_metrics']['rmse']:.4f}")
print(f" Test R2: {last['test_metrics']['r2']:.4f}")
# Estimate time remaining
avg_time = sum(r['train_time'] for r in results) / len(results)
remaining = total - completed
est_time = remaining * avg_time
hours = est_time / 3600
print(f"\nEstimated time remaining: {hours:.1f} hours ({est_time/60:.1f} minutes)")
print("\n" + "=" * 70)
if __name__ == "__main__":
main()