Setting specific device for Trainer

Really? I just did

import torch
torch.cuda.set_device(1)

and it works flawlessly. Doesn’t fix that the models are pretty big relative to my GPU memory and I have to use quite small batch size :smile:

Using torch==2.0.1 and SetFit library.

1 Like