I was going through the tensorflow-model-analysis
documentation evaluating TensorFlow models. The getting started guide talks about a special SavedModel called the EvalSavedModel
.
Quoting the getting started guide:
This EvalSavedModel contains additional information which allows TFMA to compute the same evaluation metrics defined in your model in a distributed manner over a large amount of data, and user-defined slices.
My question is how can I convert an already existing saved_model.pb
to an EvalSavedModel
?
EvalSavedModel
is exported as SavedModel message, thus there is no need in such conversion.EvalSavedModel
usesSavedModelBuilder
under the hood. It populates the estimator graph with several placeholders, creates some additional metric collections. Later on, it performs simpleSavedModelBuilder
procedure.Source - https://github.com/tensorflow/model-analysis/blob/master/tensorflow_model_analysis/eval_saved_model/export.py#L228
P.S. I suppose you want to run
model-analysis
on your model, exported bySavedModelBuilder
. SinceSavedModel
doesn't have neither metric nodes nor related collections, which are created inEvalSavedModel
, it's useless to do so -model-analysis
just simply couldn't find any metric related to your estimator.