pythonmachine-learningrustpickle

Can we import a python made ML model (.pkl) in rust?


I was building a project in Python, but since it was taking too much resources and lack concurrency I shifted to rust. Now I am confused on how to properly migrate it, most of the code has been migrated but I cannot import the ml model that was exported as .pkl file.


Solution

  • Your .pkl file is likely a python pickle. You should be able to use serde_pickle to deserialize it.