facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
906 stars 127 forks source link

env.fork() raises TypeError: "cannot convert dictionary update sequence element #0 to a sequence" #768

Closed ChrisCummins closed 1 year ago

ChrisCummins commented 2 years ago

🐛 Bug

env.reward.spaces is not deep copy-able. To reproduce:

import compiler_gym
from copy import deepcopy

with compiler_gym.make('llvm-v0') as env:
    deepcopy(env.reward.spaces["IrInstructionCount"])