在 PowerBI 中使用已部署的 Azure ML 模型

问题描述

我在将 Azure ML 与 PowerBI 连接时遇到问题。我从 Auto ML 部署了一个模型,并尝试在 PowerBI 中使用它。我成功完成了以下教程 create a predictive model by using auto MLconsume a model in PowerBI 。但是当谈到实现我的正确模型时,我可以选择目标模型,并使用正确的输入和正确的数据类型,但我收到了这个错误

Unable to parse the response from the Azure ML Web Service

我必须补充一点,我的模型预测时间序列。相反,该模型是 Microsoft 教程中的回归。而且我没有使用 R 或 Python 脚本,我使用了与第二个关于 PowerBI 的教程完全相同的方法

非常感谢您的帮助!如果您需要更多信息,请随时问我。

玛丽

解决方法

使用错误处理的良好做法:

<section style="padding-top: 30px;">
        <h4 style="text-transform:uppercase;  display: inline-block; font-weight: bold;">Os Convênios podem ser:</h4>

        <div style="display: grid; grid-template-columns: 120px repeat(1,1fr); grid-gap:30px; padding-top: 30px;">
            
            <div style="background-color: lightgray; width: 100%; height: 100%;">
                <img src="icons/money_icon.png" style="margin-left: auto; margin-right: auto; display: block; width: 50px;">
            </div>
            <div>
                <p style="font-weight:bold;">1. Impositivos:</p>
                <p>text</p>
                <p style="font-weight:bold;">2. Autorizativos:</p>
                <p>text</p>
            </div>
        </div>
    </section>

如果您改为使用 Pandas 数据框作为输入架构,这应该生成带有列名作为单独输入参数的 swagger,这些参数具有已知数据类型,然后 Power Bi 可以使用这些数据类型映射到数据流中的列。