thu-ml / tianshou

An elegant PyTorch deep reinforcement learning library.
https://tianshou.org
MIT License
7.79k stars 1.12k forks source link

[question] Abnormal running speed of off-policy algorithms on Mujoco environments. #866

Closed muchvo closed 1 year ago

muchvo commented 1 year ago
muchvo commented 1 year ago

image And this is a long time runed SAC using TianShou, it takes about 10 hours for the first 10 epoch.

Trinkle23897 commented 1 year ago

It shouldn't be so slow, will take a look soon, thanks for reporting this issue!

Trinkle23897 commented 1 year ago

can you run py-spy to get a profile result?

py-spy record -o profile.svg -- python xxx.py

and paste svg here

muchvo commented 1 year ago

can you run py-spy to get a profile result?

py-spy record -o profile.svg -- python xxx.py

and paste svg here

Okey, I will try.

muchvo commented 1 year ago

Observations shape: (111,) Actions shape: (8,) Action range: -1.0 1.0 Aborted (core dumped) Epoch #1: 1%| | 53/5000 [01:34<2:27:50, 1.79s/it, env_step=52, len=0, loss/actor=0.365, los^C

py-spy seems not working for me. It just throw Aborted (core dumped) and the script I chose is going on.

Trinkle23897 commented 1 year ago

is there a profile.svg in the same folder?

muchvo commented 1 year ago

profile I am not sure of the correctness of this graph, because it will throw core dumped in a later stage, I have to terminate it early (no longer than 1 minute).

Trinkle23897 commented 1 year ago

how many envs do you use? what's your command line?

muchvo commented 1 year ago

I am using bash, the command is just

python tianshou/examples/mujoco/mujoco_td3.py

so, all configurations are default.

MischaPanch commented 1 year ago

I'll try to look into it soon, thanks for reporting!

muchvo commented 1 year ago

I'll try to look into it soon, thanks for reporting!

Thanks a lot for your reply! After I changed the machine, this problem has been solved now. I think this is a local problem. I sincerely appreciate your effort in this community.