ProMP
ProMP copied to clipboard
Why Pickle Environment
Hi, Jonas. Thanks for sharing this great project. I am little confused on why we pickle the environment when creating the process in the MetaParallelEnvExecutor
:
self.ps = [
Process(target=worker, args=(work_remote, remote, pickle.dumps(env), envs_per_task, max_path_length, seed))
for (work_remote, remote, seed) in zip(self.work_remotes, self.remotes, seeds)] # Why pass work remotes?
and then unpickle it in the process:
envs = [pickle.loads(env_pickle) for _ in range(n_envs)]
Why we do not just initialize the environment in the process worker, which eliminates the code for pickle and unpicke.