Can't Export Segmentation Model

Running into errors when I try export a .pkl file for a segmentation model I created. When running the lesson 2 production notebook, where exporting and deploying is outlined, I do not encounter this issue. Does anyone have any ideas?

Hey Ron!

This is a known issue in Python - pickling an object also attempts to pickle the function it uses, and it fails because you’re using a lambda function somewhere which cannot be pickled. Simply turn your lambda function into an actual function and run the whole thing again and everything should work then :slight_smile:

5 Likes