cleanup
This commit is contained in:
parent
65fe304267
commit
9d2c7fb942
|
@ -1048,6 +1048,7 @@ def stop_training():
|
||||||
training_state.killed = True
|
training_state.killed = True
|
||||||
|
|
||||||
children = []
|
children = []
|
||||||
|
if args.tts_backend == "tortoise":
|
||||||
# wrapped in a try/catch in case for some reason this fails outside of Linux
|
# wrapped in a try/catch in case for some reason this fails outside of Linux
|
||||||
try:
|
try:
|
||||||
children = [p.info for p in psutil.process_iter(attrs=['pid', 'name', 'cmdline']) if './src/train.py' in p.info['cmdline']]
|
children = [p.info for p in psutil.process_iter(attrs=['pid', 'name', 'cmdline']) if './src/train.py' in p.info['cmdline']]
|
||||||
|
@ -1057,6 +1058,9 @@ def stop_training():
|
||||||
training_state.process.stdout.close()
|
training_state.process.stdout.close()
|
||||||
training_state.process.terminate()
|
training_state.process.terminate()
|
||||||
training_state.process.kill()
|
training_state.process.kill()
|
||||||
|
elif args.tts_backend == "vall-e":
|
||||||
|
print(training_state.process.communicate(input='quit')[0])
|
||||||
|
|
||||||
return_code = training_state.process.wait()
|
return_code = training_state.process.wait()
|
||||||
|
|
||||||
for p in children:
|
for p in children:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user