44 """Build and save the mock model with the given signature."""
48 module.var = tf.Variable(0, dtype=tf.int64)
52 tf.math.argmax(tf.cast(inputs[0][
"mask"], tf.int32), axis=-1) + module.var
54 return {POLICY_DECISION_LABEL: result}
56 module.action = tf.function()(action)
58 tf.saved_model.save(module, path, signatures=action)
60 with open(output_spec_path,
"w")
as f:
61 print(f
"Writing output spec to {output_spec_path}.")
62 f.write(POLICY_OUTPUT_SPEC)