mirror of https://github.com/maderix/ANE.git
fix non-interactive session error and sudo password input for powermetrics
This commit is contained in:
parent
65cfc3255f
commit
b8f09a6853
|
|
@ -672,6 +672,8 @@ def spawn_training(resume=False, steps=10000):
|
||||||
return proc
|
return proc
|
||||||
|
|
||||||
def spawn_powermetrics():
|
def spawn_powermetrics():
|
||||||
|
if not sys.stdin.isatty():
|
||||||
|
return None
|
||||||
try:
|
try:
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
['sudo', 'powermetrics', '--samplers', 'cpu_power,gpu_power,ane_power', '-i', '1000'],
|
['sudo', 'powermetrics', '--samplers', 'cpu_power,gpu_power,ane_power', '-i', '1000'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue