import glob import json import os def generate_dashboard(): # Only read completed or valid structured log files (with valid seed) files = glob.glob('models/*_s[0-9]*_results.json') results = [] for f in files: with open(f, 'r') as file: try: results.append(json.load(file)) except Exception: pass # Sort results to be predictable results.sort(key=lambda x: (x.get('mode', ''), x.get('seed', 0))) html_template = """ PentaNet vs BitNet - NeurIPS Dashboard

PentaNet Metrics Dashboard

Live interactive visualization of Model Training.

📊 Training Results Summary

Model Architecture Seed Parameters Total Time Best Perplexity (PPL) Best Val Loss

📉 Perplexity Convergence

Algorithms:
Seeds:

⚖️ PentaNet Weight Entropy (Evolution of {-2 .. 2})

PentaNet Explorer:
""" html_content = html_template.replace("DATA_PLACEHOLDER", json.dumps(results)) with open('dashboard.html', 'w') as f: f.write(html_content) print("✅ Interactive dashboard written to dashboard.html") if __name__ == "__main__": generate_dashboard()