For the code example in this chapter, using the Trainer API in colab runs on GPU but the same script in own python virtual env trains on CPU.
This isn’t a problem however with the full training script using native pytorch (same python virtual env) where we explicitly define the device and transfer model and batch to device.
Can you provide some suggestions on how to diagnose the non-GPU detection using trainer API? Thanks.