What makes fastai unstable in M1 Mac?

Ok so I’m trying to run the bird or not example on an M2 Pro 2023 with mps. The kernel dies when running:


Was anybody able to figure out what is the problem?

@przem8k did you have this kernal dies issue with your setup?
przem8k Guide: Mac setup for fastai and pytorch with GPU support in pure pip (no conda) | pnote.eu

Don’t know if you saw my comment on the discord thread but setting up a virtual environment using venv solved my issue.

Ah yes, setting the project up in an isolated venv is a very good idea :). Congratulations on getting it to work @kamransoomro84 !

1 Like

I’m using fastai n an M3 mac and use the following workarounds for the DataBlock

  • item_tfms=Resize(448) # this needs to be 2x the final size of 224
  • in aug_transforms set max_warp=0.0 # I don’t believe the function is implemented in MPS yet

in summary.

 batch_tfms=aug_transforms(size=224, min_scale=0.75, max_warp=0.0))