torch.backends.mps.is_available() is the equivalent to torch.cuda.is_available()
on this forum post @sgugger mentioned.
What is the equivalent when you have an Apple M1 processor?
learn = vision_learner(dls, resnet18, metrics=error_rate)
does not have device to be assigned