I have tried importing a simple logistic regression model into Azure ML to use in a Execute Python Script-module It's attached the correct way, but I keep getting the same error. From what I understand this has to do with the version of scikit-learn and scipy, but I created venv for almost every possible version of Python.
Error 0085: The following error occurred during script evaluation, please view the output log for more information:
---------- Start of error message from Python interpreter ----------
Caught exception while executing function: Traceback (most recent call last):
File "C:\server\invokepy.py", line 199, in batch
odfs = mod.azureml_main(*idfs)
File "C:\temp\8c190f6b5c65446f8824ed5a578a75d5.py", line 22, in azureml_main
model = pickle.load( open( "./Script Bundle/logreg_model_36.pkl", "rb" ) )
ImportError: No module named 'sklearn.linear_model._logistic'
Process returned with non-zero exit code 1
Can someone please explain which version of scikit-learn I need to execute in Azure ML studio (classic) with the environment set to 'Anconda 4.0/Python3.5'?
Kind regards
@David Eeckhout
The packages installed in the designer version of the studio are listed
here
which uses the following versions:
scikit-learn==0.22.2
scipy==1.4.1
The classic version of the studio is still available but it is preferable to use the designer studio which has better support for some of the pre-installed packages.
If you prefer to use classic version then if the package is not available you can try installing it in the execute python script. For example,
import importlib.util
package_name = 'scikit-misc'
spec = importlib.util.find_spec(package_name)
if spec is None:
import os
os.system(f"pip install scikit-misc")
Hope this helps.