2

I cannot succeed to use xgboost package in Azure Machine Learning Studio interpreter. I am trying to import a model using xgboost that I trained in order to deploy it here. But It seems that my package is not set correctly because I cannot access to certain functions, particularly "xgboost.sklearn"

My model is of course using the xgboost.sklearn.something to do the classification

I tried to implement the package following two different methods : from the tar.gz principle like here : How can certain python libraries be imported in azure ML?Like the line import humanfriendly gives error

and also by clean package with the sandbox like there : Uploading xgboost to azure machine learning: %1 is not a valid Win32 application\r\nProcess returned with non-zero exit code 1

    import sys
    import sklearn
    import pandas as pd
    import pickle
    import xgboost 

    def azureml_main(dataframe1 = None, dataframe2 = None):

        sys.path.insert(0,".\Script Bundle")

        model = pickle.load(open(".\\Script 
    Bundle\\xgboost\\XGBv1.pkl",'rb'))

        dataframe1, dftrue = filterdata(dataframe1)
        ## one processing step

        pred = predictorV1(dataframe1,dftrue)
        dataframe1['Y'] = pred

        return dataframe1

Here is the error I get

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\1098d8754a52467181a9509ed16de8ac.py", line 89, in azureml_main
    model = pickle.load(open(".\\Script Bundle\\xgboost\\XGBv1.pkl", 'rb'))
ImportError: No module named 'xgboost.sklearn'
Process returned with non-zero exit code 1

---------- End of error message from Python  interpreter  ----------
Start time: UTC 05/22/2019 13:11:08
End time: UTC 05/22/2019 13:11:49
Jatin Singh Bhati
  • 133
  • 1
  • 3
  • 14
cdorid
  • 21
  • 5

0 Answers0