Azure / Azure/MachineLearningNotebooks

model.predict_proba is not working in scoring script for classification

未关闭
#1,950 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
4.4k
派生
2.6k
PR 合并指标
30 天内没有已合并 PR

描述

**This is run function. But My output of test data is class only not probabilities.**
@input_schema('data', PandasParameterType(input_sample))
@output_schema(NumpyParameterType(output_sample))
def run(data):
result=model.predict_proba(data)
return result.tolist()

**My deployement Function for reference**
deployment = ManagedOnlineDeployment(
name=deployment_name,
endpoint_name=online_endpoint_name,
model=registered_model.id,
instance_type="Standard_F4s_v2",
instance_count=1,
code_configuration=CodeConfiguration(
code="./artifact_downloads/outputs",
scoring_script="scoring_script.py",
),
liveness_probe=ProbeSettings(
failure_threshold=30,
success_threshold=1,
timeout=2,
period=10,
initial_delay=2000,
),
readiness_probe=ProbeSettings(
failure_threshold=10,
success_threshold=1,
timeout=10,
period=10,
initial_delay=2000,
),
)

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 scoring_script.py 开始,尤其检查 run 函数及其输入/输出 schema,然后检查 ManagedOnlineDeployment CodeConfiguration。使用所示的 model.predict_proba 调用重现已部署的请求,并将其响应与本地结果进行比较。当已部署 scoring 的响应包含类别概率,而不仅仅是类别标签时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, jupyter-notebook, python
领域
cloud, machine-learning
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。