我正在尝试使用演员评论模型测试健身房环境。但是,在环境设置过程中,我得到一个重复的错误:
ConnectionResetError:[Errno 104] 对等方重置连接
这是我的代码:
def make_env(env_id, rank, seed=0,):"""
Utility function for multiprocessed env.
:param env_id: (str) the environment ID
:param num_env: (int) the number of environment you wish to have in subprocesses
:param seed: (int) the inital seed for RNG
:param rank: (int) index of the subprocess
:param s_i: (bool) reward form, only one can be true"""
def _init():
env = gym.make(env_id)
print(env.reset().shape)
return env
set_global_seeds(seed)
return _init