Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Outputted results will be changed) output whole results #354

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions handyrl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ def feed_episodes(self, episodes):
if episode is None:
continue
for p in episode['args']['player']:
model_id = episode['args']['model_id'][p]
#model_id = episode['args']['model_id'][p]
model_id = self.model_epoch
outcome = episode['outcome'][p]
n, r, r2 = self.generation_results.get(model_id, (0, 0, 0))
self.generation_results[model_id] = n + 1, r + outcome, r2 + outcome ** 2
Expand Down Expand Up @@ -479,7 +480,8 @@ def feed_results(self, results):
if result is None:
continue
for p in result['args']['player']:
model_id = result['args']['model_id'][p]
#model_id = result['args']['model_id'][p]
model_id = self.model_epoch
res = result['result'][p]
n, r, r2 = self.results.get(model_id, (0, 0, 0))
self.results[model_id] = n + 1, r + res, r2 + res ** 2
Expand Down
Loading