New Azure ML failed run due to utf8 code

NAW123 16 Reputation points
2022-11-25T20:35:45.177+00:00

Hi,
Error to use new AMl pipeline with a simpe mannual input and R script module:

AmlExceptionMessage:{"NonCompliant":"Process '/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/bin/python' exited with code 1 and error message 'Execution failed. Process exited with status code 1. Error: ModuleReflector(parser.module_entry, env).exec(\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modulehost/module_reflector.py\", line 397, in exec\n self._handle_exception(bex)\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modulehost/module_reflector.py\", line 471, in _handle_exception\n raise exception\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modulehost/module_reflector.py\", line 379, in exec\n output_tuple = self._entry.func(**reflected_input_ports, **reflected_parameters)\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modulehost/module_reflector.py\", line 76, in wrapper\n ret = func(*args, **validated_args)\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modules/r_language_modules/execute_r_script.py\", line 174, in run\n return _run_impl(**input_values)\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/modules/r_language_modules/execute_r_script.py\", line 278, in _run_impl\n ErrorMapping.throw(FailedToEvaluateScriptError(\n File \"/azureml-envs/azureml_e24376f9faf4b95be4687d020926fba7/lib/python3.8/site-packages/azureml/studio/common/error.py\", line 835, in throw\n raise err\nazureml.studio.common.error.FailedToEvaluateScriptError: The following error occurred during script evaluation, please view the output log for more information:\n---------- Start of error message from R interpreter ----------\nGot exception when invoking script: ''utf-8' codec can't decode byte 0xe2 in position 105: invalid continuation byte'.\n---------- End of error message from R interpreter ----------\n\n'. Please check the log file 'user_logs/std_log.txt' for more details."}
{
"code": "ExecutionFailed",
"target": "",
"category": "UserError",
"error_details": [
{
"key": "exit_codes",
"value": "1"
}
]
}

ModuleExceptionMessage:FailedToEvaluateScript: The following error occurred during script evaluation, please view the output log for more information:


Start of error message from R interpreter ----------
Got exception when invoking script: ''utf-8' codec can't decode byte 0xe2 in position 105: invalid continuation byte'.


End of error message from R interpreter ----------

What could be wrong?

Thanks,
A.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,710 questions
{count} votes

2 answers

Sort by: Most helpful
  1. NAW123 16 Reputation points
    2022-11-26T22:14:11.743+00:00

    azureml_main <- function(dataframe1, dataframe2) {
    test2<-dataframe1

    print(test2)

    test2$Region_ID<- as.numeric(test2$Region_ID)
    test2$City_ID<- as.numeric(test2$City_ID)
    test2$Ad_Slot_Width<- as.numeric(test2$Ad_Slot_Width)
    test2$Ad_Slot_Floor_Price<- as.numeric(test2$Ad_Slot_Floor_Price)
    test2$Paying_Price<- as.numeric(test2$Paying_Price)
    test2$Creative_ID<- as.numeric(test2$Creative_ID)
    print("before install packages")
    install.packages("./src/magrittr_1.5.zip",lib="./src/",repos=NULL)
    install.packages("./src/xgboost_0.4-3.zip",lib="./src/",repos=NULL)
    load("./src/modelclk-5000.RData")
    library(xgboost,lib.loc="./src/")
    library(Matrix)
    print("after load packages...")
    test<- as.matrix(test2)

    print(test)

    dtest<- xgb.DMatrix(test, missing=NaN)

    print(dtest)

    print("start predicting")
    pred<- predict(clik_model,dtest)
    print("prediction:")
    print(pred)
    tab3<- table(pred, test2$Log_Type)
    print(tab3)
    data.set<- as.data.frame(pred)
    data.1<-data.set[nrow(data.set),ncol(data.set)]
    print(data.1)
    data.2<- sum(tab3, na.rm=TRUE)
    print(data.2)
    prob<- as.double(as.numeric(data.1)/data.2)
    prob.frame<-data.frame(prob)
    return(list(test2=data.set))
    }


  2. NAW123 16 Reputation points
    2022-12-05T17:58:56.793+00:00

    R code not running, answer and deleted are same code.

    0 comments No comments