Sagemaker and fastai

Hey people

I have been working on a project where I need to run my fast ai model on aws sagemaker. I followed the blog post that sets up the environment and loads in the fast ai files and that all works fine .

If I run notebooks inside the fast ai folder in my sagemaker notebook instance then I can use fast ai modules without any trouble. The problem is that I cant access other imports like boto3 and sagemaker without getting a ‘module not found error’. If I run the notebook outside the fast ai folder I dont get access to the fast ai modules and if I change the kernel from fast ai to python3 I get access to boto3 and sagemaker but not to the correct fast ai environment. Im not sure how to make all this work…

Any ideas ?

1 Like

Any progress? I just learned about SageMaker and it seems like the step necessary to go from trained model -> production quickly because it generates a simple API (so I’m told).

I haven’t actually gotten to the full production stage yet, but I think the easiest way forward is to train the model locally and then pickle the model into the notebook. Then you don’t need all the fastai stuff imported into your notebook .

Be careful though - sagemaker can get expensive quickly. I accidentally made myself a big bill when I was playing around with it.

Good luck !