Matthias Gilch Matthias Gilch - 22 days ago 5
Python Question

Load pickled object on different machines

I've dumped a classifier of scikit-learn via pickle. My plan is to deploy this classifier on a different machine (armv7l). But when I want to load this object I get this error:

ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'


I expect that there are problems because of the different architectures and the C-Implementation of numpy.

Is there a way to pickle an object for an different CPU architecture?

Answer

Dumping on one architecture and loading on another is not supported. For further information see: https://github.com/scikit-learn/scikit-learn/issues/7891