浏览代码

Merge pull request #1466 from Unity-Technologies/release-v0.6-bug-fix-worker-id

Bug fix for the pytests of the worker-id
/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
450e8bfa
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 2
      ml-agents/mlagents/envs/rpc_communicator.py
  2. 9
      ml-agents/tests/envs/test_rpc_communicator.py

2
ml-agents/mlagents/envs/rpc_communicator.py


add_UnityToExternalServicer_to_server(self.unity_to_external, self.server)
self.server.add_insecure_port('localhost:' + str(self.port))
self.server.start()
self.is_open = True
except:
raise UnityWorkerInUseException(self.worker_id)

"\t The Academy and the External Brain(s) are attached to objects in the Scene\n"
"\t The environment and the Python interface have compatible versions.")
aca_param = self.unity_to_external.parent_conn.recv().unity_output
self.is_open = True
message = UnityMessage()
message.header.status = 200
message.unity_input.CopyFrom(inputs)

9
ml-agents/tests/envs/test_rpc_communicator.py


first_comm.close()
def test_rpc_communicator_close():
# Ensures it is possible to open a new RPC Communicators
# after closing one on the same worker_id
first_comm = RpcCommunicator()
first_comm.close()
second_comm = RpcCommunicator()
second_comm.close()
def test_rpc_communicator_create_multiple_workers():
# Ensures multiple RPC communicators can be created with
# different worker_ids without causing an error.

正在加载...
取消
保存