none
How to Import Externally Trained Python Models for SQL Server Machine Learning Services RRS feed

  • Question

  • I have two types of models (sklearn and GPU trained) that I want to be able to integrate into SQL Server directly.

    My investigations have found that the pickle files generated externally do not import in directly usable formats.  I compared a MultinomialNB model created against three columns from a Titanic dataset in SQL to one made using a Jupyter notebook without SQL.  By removing the first 6 bytes of my externally trained model I could get it to work, but subsequent usage of a model from the same package that use a DTM/CountVectorizer for preprocessing had a "UnpicklingError: unpickling stack underflow" when attempting the same hack.

    This seems like a slam-dunk of a use case, but my attempts to find prior work to implement rolled snake eyes.

    Any suggestions?  if sklearn and DL models need separate solutions, that' OK.

    Thanks in advance!

    Monday, April 27, 2020 8:19 AM