communications-mining
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。
Communications Mining 開発者ガイド
Last updated 2024年9月27日

例外にタグを付ける

docs image
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/exceptions/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/exceptions
必要な権限: ストリームの利用、ソースの表示
  • bash
    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 の形式は次のとおりです。
名前必須説明
uidstring例外としてタグ付けする必要があるコメントの uid
metadataメタデータ例外メタデータを含むオブジェクト。
ここで Metadata の形式は次のとおりです。
名前必須説明
typestring例外の種類は、Communications Mining UI のフィルター プロパティとして使用できます。 値には任意の文字列を指定できます。 「予測なし」や「間違った予測」など、短くわかりやすい文字列を選択してください。

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo White
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.