Since PyTorch v2.9.0 TorchScript is deprecated. It still works but is not updated and will be removed at some point
See: https://docs.pytorch.org/docs/2.9/jit.html
I should switch to torch.compile for functions but there seems to be many possible options to compile in different manners