communications-mining
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。
Communications Mining 开发者指南
Last updated 2024年10月3日

标记异常

docs image
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/exceptions/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/exceptions
所需权限:使用流、查看来源
  • 重击
    curl -X PUT 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "exceptions": [
        {
          "metadata": {
            "type": "No Prediction"
          },
          "uid": "18ba5ce699f8da1f.abcdef0123456789"
        },
        {
          "metadata": {
            "type": "Wrong Prediction"
          },
          "uid": "18ba5ce699f8da1f.0123456789abcdef"
        }
      ]
    }'curl -X PUT 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "exceptions": [
        {
          "metadata": {
            "type": "No Prediction"
          },
          "uid": "18ba5ce699f8da1f.abcdef0123456789"
        },
        {
          "metadata": {
            "type": "Wrong Prediction"
          },
          "uid": "18ba5ce699f8da1f.0123456789abcdef"
        }
      ]
    }'
  • 节点
    const request = require("request");
    
    request.put(
      {
        url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          exceptions: [
            {
              metadata: { type: "No Prediction" },
              uid: "18ba5ce699f8da1f.abcdef0123456789",
            },
            {
              metadata: { type: "Wrong Prediction" },
              uid: "18ba5ce699f8da1f.0123456789abcdef",
            },
          ],
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.put(
      {
        url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          exceptions: [
            {
              metadata: { type: "No Prediction" },
              uid: "18ba5ce699f8da1f.abcdef0123456789",
            },
            {
              metadata: { type: "Wrong Prediction" },
              uid: "18ba5ce699f8da1f.0123456789abcdef",
            },
          ],
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.put(
        "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "exceptions": [
                {
                    "uid": "18ba5ce699f8da1f.abcdef0123456789",
                    "metadata": {"type": "No Prediction"},
                },
                {
                    "uid": "18ba5ce699f8da1f.0123456789abcdef",
                    "metadata": {"type": "Wrong Prediction"},
                },
            ]
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.put(
        "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/exceptions",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "exceptions": [
                {
                    "uid": "18ba5ce699f8da1f.abcdef0123456789",
                    "metadata": {"type": "No Prediction"},
                },
                {
                    "uid": "18ba5ce699f8da1f.0123456789abcdef",
                    "metadata": {"type": "Wrong Prediction"},
                },
            ]
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • 响应
    {
      "status": "ok"
    }{
      "status": "ok"
    }

此端点允许您在平台中将注释标记为异常,以便模型训练器可以查看注释并为其加上标签,以改进模型。 我们建议标记模型未返回预测的注释,以及模型返回错误预测的注释。 (有关设计异常处理流程的帮助,请查看集成指南)。

名称类型必填说明
exceptionsarray<Exception>异常列表。
其中Exception具有以下格式:
名称类型必填说明
uid字符串应标记为异常的注释的uid
metadata元数据包含异常元数据的对象。
其中Metadata具有以下格式:
名称类型必填说明
type字符串异常类型将在 Communications Mining 用户界面中用作筛选器属性。 该值可以是任意字符串。 请选择一个简短易懂的字符串,例如“无预测”和“预测错误”。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。