Your chain needs custom pre- and post-processing around the model. What do you code?
Why B is the answer
A pyfunc model
A pyfunc model lets you wrap your own Python around the model, so preprocessing and postprocessing are served with it.
In detail
- A pyfunc model wraps your own Python logic around the model.
- That gives you preprocessing and postprocessing.
- Log the dependencies with it.
Use case
An illustrative scenario, not a real incident.
A chain must clean input and format output around the model. A pyfunc model wraps that logic, so it travels with the model and is served as one unit.
See it in different ways
flowchart LR A["Request"] --> B["Preprocess"] B --> C["Model"] C --> D["Postprocess"] D --> E["Response"]
sequenceDiagram participant C as pyfunc chain participant M as MLflow participant U as Unity Catalog participant S as Model Serving C->>M: Log the model M->>U: Register a version U->>S: Deploy to an endpoint
sequenceDiagram participant P0 as Request participant P1 as pyfunc wrapper participant P2 as Model P0->>P1: Raw input P1->>P2: Preprocessed input P2-->>P1: Output P1-->>P0: Postprocessed response
Key point: pyfunc wraps your own logic around a model.
Why the other options are wrong
- A. An inference table
- An inference table records traffic.
- C. A cluster policy
- A cluster policy controls compute.
- D. A Lakeflow job
- A job schedules work, and does not define a served model.

