Real-time ML: Accelerating Python for inference (below 10ms) at scale
summary
Claims a system that turns Python UDFs into static DAGs so inference runs without the GIL and hits sub-10ms latencies, using a symbolic Python interpreter that transpiles resolvers into expression graphs, caches them at plan time, and executes on Velox (C++, ~4k stars). Example pipelines routinely expand into ~2 dozen resolvers (9 SQL, 4 Redis lookups, 5 Python resolvers, 18 expression UDFs); fallbacks, gas limits, and common-subexpression elimination handle unsupported code and planning costs.
AI-written summary · about
chapters (10)
- 0:00Introduction to real-time ML
- 2:53Why latency matters in ML
- 4:59Example query in Chalk
- 7:08Dynamic query planner
- 8:52Symbolic Python interpreter
- 13:08Handling unsupported Python
- 15:00Benefits of Python acceleration
- 16:05Comparison with Rust engine
- 17:28Scaling workloads across hosts
- 18:30Future of Python in ML
