01engineering.zalando.com
Upgrading MLflow Pipelines Across a Python Version Boundary
The team migrated production MLflow models from Python 3.10 on Databricks Runtime 14.3 to Python 3.12 on DBR 17.3 without retraining. Legacy cloudpickle artifacts failed because Python bytecode changed, causing a code() TypeError. A temporary matching environment loaded the models, extracted their native artifacts, and repackaged them in standardized MLflow PythonModel wrappers with pinned dependencies and code_paths. The team now favors native formats and Models from Code to eliminate pickle-related compatibility risks.