Hello everyone,
I am wondering how to implement and deploy a trained model for use within an Alteryx workflow, that runs on an Alteryx server.
The model (using `scikit-learn` and `xgboost`) is trained and validated in Python outside of Alteryx. I'd simply pickle the trained model to be used later.
In Alteryx, I'd like to load the model within the Python tool to make predictions for data coming through Alteryx. There I wonder about two things:
I guess others have already faced similar problems? What's the best practice -- i.e. when not using Promote?
Looking forward to your suggestions!
Best
Christopher
Solved! Go to Solution.
@chrisha You would follow the same steps on the Server's Designer as you would on your desktop. On the server, you would run Designer as admin and use the python tool to install the packages you are looking for. The pickle file would be on the server and you would reference it in the Python tool. Since its a file made out of bits/bytes, you cannot bring in as a model object using the regular tools. Thus, you have to use the Python tool (UNC path) to reference it.
Hope that helps.
Thanks, @DiganP !
While including the model as asset would have been nice, we now use the UNC path and it works fine.
Just a heads up for anyone finding this thread later: Pickled objects only work well across the same version of Python. My Alteryx uses Python 3.6.0, so your training environment needs the same version. And you might want to use the command line to upgrade packages such as numpy or scipy in the Python tool environment.