Azure ML Studio-GradientBoostingRegressor无法正常工作 [英] Azure ML studio - GradientBoostingRegressor not working
问题描述
我使用python代码训练了一个模型,并使用Azure ML Studio将其公开为Web服务.在ML Studio上运行时,出现以下错误消息.
I trained a model using python code and expose as web service using Azure ML Studio. I am getting the following error message when I run it on ML Studio.
错误0085:在脚本评估过程中发生了以下错误,请查看输出日志以获取更多信息:
----------来自Python解释器的错误消息的开始----------
执行函数时捕获到异常:追溯(最近一次调用为last):
批量处理文件"C:\ server \ invokepy.py",第199行
odfs = mod.azureml_main(* idfs)
在azureml_main中的文件"C:\ temp \ b4a93c599a6f4c7884252854db6e908e.py",第55行
pred = model.predict(dataframe1)
预测中的文件"C:\ pyhome \ lib \ site-packages \ sklearn \ ensemble \ gradient_boosting.py",行1782
返回self._decision_function(X).ravel()
_decision_function中的文件"C:\ pyhome \ lib \ site-packages \ sklearn \ ensemble \ gradient_boosting.py",行1121
分数=自我._init_decision_function(X)
_init_decision_function中的文件"C:\ pyhome \ lib \ site-packages \ sklearn \ ensemble \ gradient_boosting.py",行1112
如果X.shape [1]!= self.n_features:
AttributeError:"GradientBoostingRegressor"对象没有属性"n_features"
返回的非零退出代码1的进程
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\b4a93c599a6f4c7884252854db6e908e.py", line 55, in azureml_main
pred = model.predict(dataframe1)
File "C:\pyhome\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line 1782, in predict
return self._decision_function(X).ravel()
File "C:\pyhome\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line 1121, in _decision_function
score = self._init_decision_function(X)
File "C:\pyhome\lib\site-packages\sklearn\ensemble\gradient_boosting.py", line 1112, in _init_decision_function
if X.shape[1] != self.n_features:
AttributeError: 'GradientBoostingRegressor' object has no attribute 'n_features'
Process returned with non-zero exit code 1
可以请任何人帮助解决此问题吗?
Could you please anyone help to resolve this issue?
推荐答案
我建议您先在本地测试您的代码,然后再将其作为AML Studio实验的一部分进行上传,
I recommend test your code locally before uploading it as part of an AML Studio experiment, probably you did it.
在这种情况下,请检查Studio中可用的python库的版本,可能与您在IDE中使用的版本不同.
In that case, check the version of the python libraries available in Studio, maybe are different to those you're using in your IDE.
如果问题仍然存在,那么查看代码和实验管道会很有用.
If the problem persists, it would be useful to take a look to the code and to the pipeline of your experiment.
最好
Ariel
这篇关于Azure ML Studio-GradientBoostingRegressor无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!