From b8f09a685354b4ec3fbd381ae49844f0bf655770 Mon Sep 17 00:00:00 2001 From: Guitared Date: Tue, 3 Mar 2026 14:14:30 +0700 Subject: [PATCH] fix non-interactive session error and sudo password input for powermetrics --- training/dashboard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/training/dashboard.py b/training/dashboard.py index ed019ef..b55c12e 100644 --- a/training/dashboard.py +++ b/training/dashboard.py @@ -672,6 +672,8 @@ def spawn_training(resume=False, steps=10000): return proc def spawn_powermetrics(): + if not sys.stdin.isatty(): + return None try: proc = subprocess.Popen( ['sudo', 'powermetrics', '--samplers', 'cpu_power,gpu_power,ane_power', '-i', '1000'],