Skip to content

Commit

Permalink
Remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
notadamking committed Jul 8, 2019
1 parent ba8dda7 commit e8c8eab
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions optimize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import multiprocessing
import numpy as np

import multiprocessing
from lib.RLTrader import RLTrader

np.warnings.filterwarnings('ignore')
Expand All @@ -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)

0 comments on commit e8c8eab

Please sign in to comment.