ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

TypeError: cannot pickle 'isaacgym._bindings.linux-x86_64.gym_38.Gym' object

Open 13253591602 opened this issue 3 years ago • 5 comments

When I run examples/demo_Isaac_Gym.py. The following error has occurred:

Traceback (most recent call last): File "examples/demo_IsaacGym.py", line 81, in demo(task) File "examples/demo_IsaacGym.py", line 76, in demo train_and_evaluate(args) File "/home/yh/py-packages/ElegantRL/elegantrl/train/run.py", line 89, in train_and_evaluate evaluator = init_evaluator(args, gpu_id) File "/home/yh/py-packages/ElegantRL/elegantrl/train/run.py", line 68, in init_evaluator eval_env = build_env(args.env, eval_func, eval_args) File "/home/yh/py-packages/ElegantRL/elegantrl/train/config.py", line 208, in build_env env = deepcopy(env) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/home/yh/anaconda3/envs/erl/lib/python3.8/copy.py", line 161, in deepcopy rv = reductor(4) TypeError: cannot pickle 'isaacgym._bindings.linux-x86_64.gym_38.Gym' object

I use Isaac Gym - Preview 4 Release.

13253591602 avatar Sep 21 '22 08:09 13253591602

In addition:

  • This bug don't occur in DGX64 server(A100 GPU), 3080GPU or 3090GPU.
  • This bug don't occur in fork ElegantRL/tree/IsaacGym-Single-Process
  • check_isaac_gym() can be run normally. https://github.com/AI4Finance-Foundation/ElegantRL/blob/5cf6190d114374b975232f37fcdbae6e10f6e22e/elegantrl/envs/IsaacGym.py#L213
  • This bug occurs in Isaac Gym - Preview 4 or Preview 3

Yonv1943 avatar Sep 21 '22 10:09 Yonv1943

In addition:

  • This bug don't occur in DGX64 server(A100 GPU), 3080GPU or 3090GPU.
  • check_isaac_gym() can be run normally. https://github.com/AI4Finance-Foundation/ElegantRL/blob/5cf6190d114374b975232f37fcdbae6e10f6e22e/elegantrl/envs/IsaacGym.py#L213
  • This bug occurs in Isaac Gym - Preview 4 or Preview 3
  • This bug occurs in Isaac Gym - Preview 4 or Preview 3

yeah, this function works well on my server

13253591602 avatar Sep 23 '22 01:09 13253591602

" RTX3080ti , Isaac Gym - Preview 4 " got this error too.

Timkeeper2018 avatar Sep 24 '22 06:09 Timkeeper2018

Is there a workaround a part from downgrading IsaacGym?

mikygit avatar Oct 20 '22 14:10 mikygit

" RTX3090 , Isaac Gym - Preview 4 " got this error too.

Skylark0924 avatar Nov 21 '22 06:11 Skylark0924