浏览代码

Add back 'get_communicator' in UnityEnvironment

Removing this function breaks some tests, and the only way around
this at this time is a bigger refactor or hacky fixes to tests.

For now, I'd suggest we just revert this small part of a change
and keep a refactor in mind for the future.
/develop-generalizationTraining-TrainerController
Jonathan Harper 5 年前
当前提交
35eb595d
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 6
      ml-agents/mlagents/envs/environment.py

6
ml-agents/mlagents/envs/environment.py


self._version_ = "API-6"
self._loaded = False # If true, this means the environment was successfully loaded
self.proc1 = None # The process that is started. If None, no process was started
self.communicator = RpcCommunicator(worker_id, base_port, timeout_wait)
self.communicator = self.get_communicator(worker_id, base_port, timeout_wait)
# If the environment name is None, a new environment will not be launched
# and the communicator will directly try to connect to an existing unity environment.

@property
def external_brain_names(self):
return self._external_brain_names
@staticmethod
def get_communicator(worker_id, base_port, timeout_wait):
return RpcCommunicator(worker_id, base_port, timeout_wait)
def executable_launcher(self, file_name, docker_training, no_graphics):
cwd = os.getcwd()

正在加载...
取消
保存