View source on GitHub |
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. |