I have created a code in python to predict the probability of the product being sold or not, I want to integrate it in tableau. I have followed the same steps as : Leverage Tableau and Python to build advanced-analytics applications.
I am using the breast cancer example.
I am writing the code in jupyter notebook.
I have also created a calculated field in tableau :
[Parameters].[Customer Name],[Parameters].[Sales],[Parameters].[Profit],[Parameters].[City],[Parameters].[Postal Code],[Parameters].[Sub-Category],[Parameters].[Quantity])
When I am dragging this calculated field in tableau, I am getting this error;
Unable to complete action
An error occurred while communicating with the External Service.
Error processing script
The endpoint you're trying to query did not respond. Please make sure the endpoint exists and the correct set of arguments are provided.
I have read few blogs and community pages , the solution there provided is;
"Most likely answer is that the model wasn't successfully trained. When this happens, you can still publish a function to TabPy server but the error will surface when you try to run the model. On some Windows machines, this could happen due to a bug in Python when you try to run model fitting by using all the CPU cores you have. This is controlled by the "n_jobs=-1" setting in the Jupyter workbook. I suspect this might be the issue.
The solution is to set n_jobs=1 which will run the training using only a single core. After making this, if you add the argument override=True to your deploy function then run the entire Jupyter workbook (Cell > Run All) I suspect it might fix it."
My question is how do we solve this? And when it is said the model isn't successfully trained what is meant by it? And how do I set the n_jobs=1?
Help is much appreciated.