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?
EvalSavedModelis exported as SavedModel message, thus there is no need in such conversion.EvalSavedModelusesSavedModelBuilderunder the hood. It populates the estimator graph with several placeholders, creates some additional metric collections. Later on, it performs simpleSavedModelBuilderprocedure.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-analysison your model, exported bySavedModelBuilder. SinceSavedModeldoesn't have neither metric nodes nor related collections, which are created inEvalSavedModel, it's useless to do so -model-analysisjust simply couldn't find any metric related to your estimator.