Subclasses of TorchModelV2 must also inherit from nn.Module, e.g., MyModel(TorchModelV2, nn.Module)

Utilizing this example: ray/custom_env.py at master · ray-project/ray · GitHub

I get the following error when using Pytorch.

Subclasses of TorchModelV2 must also inherit from nn.Module, e.g., MyModel(TorchModelV2, nn.Module)

Is there any guidance on the best approach to fix this API change?

Could not reproduce this on current master.
The script runs fine there.
That’s what you are trying to do, right? Simply run the script?