mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-10 11:40:58 +08:00
Major update
This commit is contained in:
@@ -51,7 +51,7 @@ def evaluate(config, task, learning_network, extra):
|
||||
with open('data/%s-%s-statistics-%s.bin' % (
|
||||
config.tag, config.worker.__name__, task.name), 'wb') as f:
|
||||
pickle.dump([test_rewards, test_points, test_wall_times], f)
|
||||
if np.mean(rewards) > task.success_threshold or (config.max_steps and steps >= config.max_steps):
|
||||
if np.mean(rewards) >= config.success_threshold or (config.max_steps and steps >= config.max_steps):
|
||||
config.stop_signal.value = True
|
||||
break
|
||||
|
||||
@@ -87,7 +87,6 @@ class AsyncAgent:
|
||||
extra = None
|
||||
args = [(i, config, learning_network, extra) for i in range(config.num_workers)]
|
||||
args.append((config, task, learning_network, extra))
|
||||
# procs = []
|
||||
procs = [mp.Process(target=evaluate, args=args[-1])]
|
||||
procs.extend([mp.Process(target=train, args=args[i]) for i in range(config.num_workers)])
|
||||
for p in procs: p.start()
|
||||
|
||||
Reference in New Issue
Block a user