-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_tensorboard.py
More file actions
executable file
·38 lines (32 loc) · 1.14 KB
/
start_tensorboard.py
File metadata and controls
executable file
·38 lines (32 loc) · 1.14 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
#!/usr/bin/env python3
"""
Script para iniciar TensorBoard y monitorear el progreso
"""
import subprocess
import sys
from pathlib import Path
def start_tensorboard():
"""Iniciar TensorBoard"""
try:
# Directorio de logs de TensorBoard
log_dir = Path(__file__).parent / "logs" / "tensorboard"
if not log_dir.exists():
print(f"❌ Directorio de TensorBoard no encontrado: {log_dir}")
print("💡 Ejecuta primero el procesamiento para generar logs")
return
print(f"🚀 Iniciando TensorBoard en: {log_dir}")
print("📊 Abre tu navegador en: http://localhost:6006")
print("⏹️ Presiona Ctrl+C para detener")
# Iniciar TensorBoard
subprocess.run([
sys.executable, "-m", "tensorboard.main",
"--logdir", str(log_dir),
"--port", "6006",
"--host", "0.0.0.0"
])
except KeyboardInterrupt:
print("\n⏹️ TensorBoard detenido")
except Exception as e:
print(f"❌ Error iniciando TensorBoard: {e}")
if __name__ == "__main__":
start_tensorboard()