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

(2024/04) merge develop into master #355

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions handyrl/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def _send_thread(self):
conn, send_data = self.output_queue.get()
try:
conn.send(send_data)
except TimeoutError:
self.disconnect(conn)
except ConnectionResetError:
self.disconnect(conn)
except BrokenPipeError:
Expand All @@ -215,6 +217,9 @@ def _recv_thread(self):
for conn in conns:
try:
recv_data = conn.recv()
except TimeoutError:
self.disconnect(conn)
continue
except ConnectionResetError:
self.disconnect(conn)
continue
Expand Down
4 changes: 2 additions & 2 deletions handyrl/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def resolve_agent(model_path):

print('%d process, %d games' % (num_process, num_games))

seed = random.randrange(1e8)
seed = random.randrange(int(1e8))
print('seed = %d' % seed)

opponent = model_paths[1] if len(model_paths) > 1 else 'random'
Expand All @@ -416,7 +416,7 @@ def eval_server_main(args, argv):

print('%d process, %d games' % (num_process, num_games))

seed = random.randrange(1e8)
seed = random.randrange(int(1e8))
print('seed = %d' % seed)

evaluate_mp(env, [None] * len(env.players()), None, env_args, {'default': {}}, num_process, num_games, seed)
Expand Down
Loading