multiprocessing_env.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:universe 作者: openai 项目源码 文件源码
def __init__(self, env_m, worker_idx):
        # These are instantiated in the *parent* process
        # currently. Probably will want to change this. The parent
        # does need to obtain the relevant Spaces at some stage, but
        # that's doable.
        self.worker_idx = worker_idx
        self.env_m = env_m
        self.m = len(env_m)
        self.parent_conn, self.child_conn = multiprocessing.Pipe()
        self.joiner = multiprocessing.Process(target=self.run)
        self._clear_state()

        self.start()

        # Parent only!
        self.child_conn.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号