From e8c8eab903325b33605498469df75c2f4e673ef9 Mon Sep 17 00:00:00 2001 From: adamjking3 Date: Sun, 7 Jul 2019 22:34:09 -0700 Subject: [PATCH] Remove unnecessary comments --- optimize.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/optimize.py b/optimize.py index 97bd86b..fb5634b 100644 --- a/optimize.py +++ b/optimize.py @@ -1,6 +1,6 @@ +import multiprocessing import numpy as np -import multiprocessing from lib.RLTrader import RLTrader np.warnings.filterwarnings('ignore') @@ -13,19 +13,17 @@ def optimize_code(params): if __name__ == '__main__': n_process = multiprocessing.cpu_count() - params = {'n_cpu': n_process} + params = {'n_envs': n_process} - # processes = [] - # for i in range(n_process): - # processes.append(multiprocessing.Process(target=optimize_code, args=(params,))) + processes = [] + for i in range(n_process): + processes.append(multiprocessing.Process(target=optimize_code, args=(params,))) - # for p in processes: - # p.start() + for p in processes: + p.start() - # for p in processes: - # p.join() + for p in processes: + p.join() trader = RLTrader(**params) - # trader.train(test_trained_model=True, render_trained_model=True) - - trader.test(model_epoch=10) + trader.train(test_trained_model=True, render_trained_model=True)