Error when setting format of dataset to torch

I’ve spent hours looking into and literally after a minute since posting I looked into issues with using Huggingface datasets with PyTorch and found with_format so I’m guessing my code is deprecated.

EDIT: That actually did not work. It just gave me a different error.

EDIT: Downgrading numpy 1.x is a workaround.