tfma.extractors.PredictionsExtractor
Stay organized with collections
Save and categorize content based on your preferences.
Creates an extractor for performing predictions over a batch.
tfma.extractors.PredictionsExtractor(
eval_config: tfma.EvalConfig
,
eval_shared_model: Optional[tfma.types.EvalSharedModel
] = None,
output_keypath: Sequence[str] = (constants.PREDICTIONS_KEY,)
) -> tfma.extractors.Extractor
The extractor's PTransform loads and runs the serving saved_model(s) against
every Extracts yielding a copy of the incoming Extracts with an additional
Extracts added for the predictions keyed by tfma.PREDICTIONS_KEY. The model
inputs are searched for under tfma.FEATURES_KEY (keras only) or tfma.INPUT_KEY
(if tfma.FEATURES_KEY is not set or the model is non-keras). If multiple
models are used the predictions will be stored in a dict keyed by model name.
Note that the prediction_key in the ModelSpecs also serves as a key into the
dict of the prediction's output.
Args |
eval_config
|
Eval config.
|
eval_shared_model
|
Shared model (single-model evaluation) or list of shared
models (multi-model evaluation) or None (predictions obtained from
features).
|
output_keypath
|
A sequence of keys to be used as the path to traverse and
insert the outputs in the extract.
|
Returns |
Extractor for extracting predictions.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-04-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]