astooke / rlpyt

Reinforcement Learning in PyTorch
MIT License
2.22k stars 322 forks source link

Windows Requires Pytorch >= 1.3 #112

Open bpiv400 opened 4 years ago

bpiv400 commented 4 years ago

Hi Adam,

I wanted to let you know that on Windows, you need Pytorch 1.3 or later to use your implementation of PPO. When using Pytorch 1.2, calls to PPO.optimize_agent throw this error:

TypeError: can't convert np.ndarray of type numpy.int32. The only supported types are: float64, float32, float16, int64, int32, int16, int8, and uint8.

This bug is documented in the Pytorch repo here: https://github.com/pytorch/pytorch/issues/22615

But updating to 1.3 or 1.4 solves the problem.

bpiv400 commented 4 years ago

I can give more info on where exactly it occurs if you like, but I don't think it's essential because it's not a problem after updating.

astooke commented 4 years ago

OK good to note! I'll try running everything again with the latest PyTorch and then update the conda env yaml if everything runs. I'm only in Ubuntu tho.

bpiv400 commented 4 years ago

Ubuntu doesn't seem to have the issue. My code ran without error on Ubuntu with Pytorch 1.2.