Yeah, sometimes it works but not every time.
One hack we can do is we can change the backend config of colab
colab1080×821 79.7 KB .
Here “hm” represents ‘high memory’. So we can add machine_shape field to get high ram