Kamae: Bridging Spark and Keras for Seamless ML Preprocessing
George Barrowclough, Marian Andrecki, James Shinner, Daniele Donghi

TL;DR
Kamae is an open-source library that converts PySpark preprocessing pipelines into Keras models, ensuring consistent feature processing in production recommender systems and reducing engineering complexity.
Contribution
This work introduces Kamae, a novel tool that seamlessly translates Spark preprocessing steps into Keras layers, bridging offline and online ML environments.
Findings
Enables consistent preprocessing across training and inference.
Reduces engineering effort and risk of dataset shift.
Demonstrated on real-world datasets and pipelines.
Abstract
In production recommender systems, feature preprocessing must be faithfully replicated across training and inference environments. This often requires duplicating logic between offline and online environments, increasing engineering effort and introducing risks of dataset shift. We present Kamae, an open-source Python library that bridges this gap by translating PySpark preprocessing pipelines into equivalent Keras models. Kamae provides a suite of configurable Spark transformers and estimators, each mapped to a corresponding Keras layer, enabling consistent, end-to-end preprocessing across the ML lifecycle. Framework's utility is illustrated on real-world use cases, including MovieLens dataset and Expedia's Learning-to-Rank pipelines. The code is available at https://github.com/ExpediaGroup/kamae.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning and Data Classification · Generative Adversarial Networks and Image Synthesis · Explainable Artificial Intelligence (XAI)
