How do I troubleshoot "The two structures don't have the same nested structure"?

I started seeing this issue a lot since ray 1.10 ish. I fixed it by explicitly defining the data types of all numpy arrays to match what I set in the space. For example, in the past I could get away with np.array([1, 0, 2]) for a space like Box(0, 2, (3,), dtype=int), but now I have to explicitly write np.array([1, 0, 2], dtype=int)

1 Like