tfma.utils.get_model_type
Stay organized with collections
Save and categorize content based on your preferences.
Returns model type for given model spec taking into account defaults.
tfma.utils.get_model_type(
model_spec: Optional[tfma.ModelSpec
],
model_path: Optional[str] = '',
tags: Optional[List[str]] = None
) -> str
The defaults are chosen such that if a model_path is provided and the model
can be loaded as a keras model then TF_KERAS is assumed. Next, if tags
are provided and the tags contains 'eval' then TF_ESTIMATOR is assumed.
Lastly, if the model spec contains an 'eval' signature TF_ESTIMATOR is assumed
otherwise TF_GENERIC is assumed.
Args |
model_spec
|
Model spec.
|
model_path
|
Optional model path to verify if keras model.
|
tags
|
Options tags to verify if eval is used.
|
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.
[[["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."],[],[]]