forked from mrq/DL-Art-School
use fork instead
This commit is contained in:
parent
4abc094b47
commit
496fb81997
|
@ -48,5 +48,11 @@ if __name__ == '__main__':
|
||||||
nd['path'][k] = p.replace(base_path, f'{base_path}\\{mod}')
|
nd['path'][k] = p.replace(base_path, f'{base_path}\\{mod}')
|
||||||
all_opts.append(nd)
|
all_opts.append(nd)
|
||||||
|
|
||||||
with ThreadPool(len(modifications)) as pool:
|
for i in range(1,len(modifications)):
|
||||||
list(pool.imap(functools.partial(launch_trainer, opt_path=base_opt), all_opts))
|
pid = os.fork()
|
||||||
|
if pid == 0:
|
||||||
|
rank = i
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
rank = 0
|
||||||
|
launch_trainer(all_opts[i], base_opt)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user