none
one question about data preprocess in model prediction of Auto Machine Learning service RRS feed

  • Question

  • Dears,

    Recently, I tried to use MS Auto Machine Learning function to do some test. I uploaded one dataset, some value is string type, the training task runs well and got some models.

    The top1 model's name is VotingEnsemble and I deployed it as a service with default scoring file. In this file, it contained one sample data:

    input_sample = pd.DataFrame(data=[{"age":39,"workclass":" State-gov","fnlwgt":77516,"education":" Bachelors","education_num":13,"marital_status":" Never-married","occupation":" Adm-clerical","relationship":" Not-in-family","race":" White","sex":" Male","capital_gain":2174,"capital_loss":0,"hours_per_week":40,"nativve.country":" United-States"}])

    This data is the 1st line of train dataset.

    Then I try to do predict task with restful API, I applied the same data(first line of train data), but it failed, the error information is:

    "invalid literal for int() with base 10: ' State-gov'"

    The code is:

    t_list = [39,
     " State-gov",
     77516,
     " Bachelors",
     13,
     " Never-married",
     " Adm-clerical",
     " Not-in-family",
     " White",
     " Male",
     2174,
     0,
     40,
     " United-States"]

    data = {"data": [t_list]}

    input_data = json.dumps(data)
    resp = requests.post(scoring_uri, input_data, headers=headers)

    It seems that model didn't do data preprocessing before prediction. What's wrong with my test?

    thanks.

    Sunday, September 15, 2019 2:15 PM

All replies

  • Hi Rosannachu,

    Thank you for reaching out, I can reproduce this error when I only follow the tutorial. May I know do you have a support plan under your Azure subscription ID? I would suggest you to open a ticket in Help + Support. At the meantime, I am working on investigation of it as well.

    Regards,

    Yutong

    Tuesday, September 17, 2019 10:38 PM
    Moderator
  • Hi Rosannachu,

    We haven't heard from you. Have you solved your issue? 

    Regards,

    Yutong

    Monday, September 23, 2019 4:00 PM
    Moderator