tdmpc2 icon indicating copy to clipboard operation
tdmpc2 copied to clipboard

Segmentation Fault with custom env

Open ChrisAGBlake opened this issue 8 months ago • 1 comments

Hi, I'm using it with a custom gymnasium environment. Part of the env is in c++ with python bindings using pybind11. When trying to train using TDMPC2 I will get a Seg Fault when some of the pybind11 code is called. I use this same environment with dreamer v3 and PPO and have no issues. Any ideas what might be causing this? I get the same result when using the docker container or just a local conda virtual env.

Thanks very much for any info or advice. Chris

ChrisAGBlake avatar Apr 02 '25 06:04 ChrisAGBlake

Hi @ChrisAGBlake, I can't say for sure what the issue might be, but one thing to try would be to disable torch.compile with compile=false. It's possible that the code compilation could somehow interfere with the environment. Are you able to run TD-MPC2 with e.g. DMControl?

nicklashansen avatar Apr 08 '25 18:04 nicklashansen