Closed YiqiJ closed 3 years ago
Also getting this error
@YiqiJ Why did you change to @44105ca instead of the one suggested in the repo? What's the pytorch version you are using?
I fixed this by replacing
action = (greedy_action * (1 - rand) + random_action * rand).detach().long()
with
action = torch.where(rand < eps, random_action, greedy_action).detach()
on this line https://github.com/facebookresearch/hanabi_SAD/blob/master/pyhanabi/r2d2.py#L277
Not quite sure why the original line was causing me issues... so weird.
Ah, now I remember. Are you using a newer version of pytorch? I ran into similar problems when I tried to upgrade to 1.7.0. Changing all the tensor of this line to float seemed to work for me back then. I don't know the fundamental reason for this. Seems to be a pytorch issue.
Yeah I was using 1.8.
I wonder if it has something to do with negative values for the long dtype? maybe newer versions parse it as -rand + 1 and fail at making a negative long value
Hi! I am able to successfully build it. The only modification I did is using pybind11 version @44105ca instead of @a1b71df. However, when I run
dev.sh
, I am running intoThe Illegal move error is triggered by
optim.step()
and the assertion error is raised inhanabi_env.cc
. Any idea on why this is happening?Thanks a lot for your time and help!
Sincerely,
Yiqi