write a custom kserve transformer to pre/post-process requests around a predictor

domain: kserve.github.io/website/docs · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Derive a class from the KServe base Model class and override its preprocess and postprocess handlers
  2. Implement preprocess() to convert the raw client request into the tensor format the predictor expects
  3. Implement postprocess() to convert the predictor's raw response into the format the client expects, keeping this logic independent of the model itself
  4. Deploy the Transformer as an additional container in the same InferenceService pod alongside the predictor
  5. By default the transformer calls the predictor over REST; pass --protocol grpc-v2 if the transformer needs to call the predictor over gRPC using the Open Inference Protocol instead

Known gotchas

Related routes

Deploy a custom predictor container as a KServe InferenceService
kserve.github.io · 5 steps · unrated
Configure a KServe InferenceService canary rollout to shift traffic to a new model version safely
kserve.github.io/website/docs · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans