BulkInferrer TFX パイプラインコンポーネント
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
BulkInferrer TFX コンポーネントは、ラベルの無いデータで一括推論を実行します。生成される InferenceResult(tensorflow_serving.apis.prediction_log_pb2.PredictionLog) には、元の特徴量と予測結果が含まれます。
BulkInferrer は次の項目を消費します。
BulkInferrer は次の項目を発します。
BulkInferrer コンポーネントを使用する
BulkInferrer TFX コンポーネントは、ラベル無しの tf.Examples に対して一括推論を実行するために使用されます。通常、検証済みのモデルで推論を実行するように Evaluator の後にデプロイされるか、エクスポートされたモデルで直接推論を実行するように Trainer コンポーネントの後にデプロイされます。
現在、インメモリモデル推論とリモート推論を実行します。リモート推論の場合は、モデルが Cloud AI Platform にホストされている必要があります。
次は、典型的なコードです。
from tfx import components
...
bulk_inferrer = components.BulkInferrer(
examples=examples_gen.outputs['examples'],
model=trainer.outputs['model'],
model_blessing=evaluator.outputs['blessing'],
data_spec=bulk_inferrer_pb2.DataSpec(),
model_spec=bulk_inferrer_pb2.ModelSpec()
)
より詳細な情報は、BulkInferrer API リファレンスをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2021-02-16 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2021-02-16 UTC。"],[],[],null,["# The BulkInferrer TFX Pipeline Component\n\n\u003cbr /\u003e\n\nThe BulkInferrer TFX component performs batch inference on unlabeled data. The\ngenerated\nInferenceResult([tensorflow_serving.apis.prediction_log_pb2.PredictionLog](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_log.proto))\ncontains the original features and the prediction results.\n\nBulkInferrer consumes:\n\n- A trained model in [SavedModel](https://www.tensorflow.org/guide/saved_model.md) format.\n- Unlabelled tf.Examples that contain features.\n- (Optional) Validation result from [Evaluator](https://www.tensorflow.org/tfx/guide/evaluator.md) component.\n\nBulkInferrer emits:\n\n- [InferenceResult](https://github.com/tensorflow/tfx/blob/master/tfx/types/standard_artifacts.py)\n\nUsing the BulkInferrer Component\n--------------------------------\n\nA BulkInferrer TFX component is used to perform batch inference on unlabeled\ntf.Examples. It is typically deployed after an\n[Evaluator](https://www.tensorflow.org/tfx/guide/evaluator.md) component to\nperform inference with a validated model, or after a\n[Trainer](https://www.tensorflow.org/tfx/guide/trainer.md) component to directly\nperform inference on exported model.\n\nIt currently performs in-memory model inference and remote inference.\nRemote inference requires the model to be hosted on Cloud AI Platform.\n\nTypical code looks like this: \n\n bulk_inferrer = BulkInferrer(\n examples=examples_gen.outputs['examples'],\n model=trainer.outputs['model'],\n model_blessing=evaluator.outputs['blessing'],\n data_spec=bulk_inferrer_pb2.DataSpec(),\n model_spec=bulk_inferrer_pb2.ModelSpec()\n )\n\nMore details are available in the\n[BulkInferrer API reference](https://www.tensorflow.org/tfx/api_docs/python/tfx/v1/components/BulkInferrer)."]]