Your question is Modular Distributed Inference Refactor. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
How would you refactor a monolithic model inference script into a distributed, modular architecture?
Explain how you would separate preprocessing, model execution, postprocessing, orchestration, and observability while preserving correctness and predictable latency. Cover deployment boundaries, online versus batch inference, scaling, testing, rollout, failure handling, and training-serving consistency.