You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: OnnxModelHandlerNumpy and XGBoostModelHandler ignore model updates from model_metadata_pcoll #41384
OnnxModelHandlerNumpy (onnx_inference.py) and XGBoostModelHandler (xgboost_inference.py) don't override ModelHandler.update_model_path, which is a no-op in the base class. When RunInference gets a new ModelMetadata on model_metadata_pcoll (for example from WatchFilePattern), _RunInferenceDoFn._load_model calls update_model_path(new_path) and then load_model(), which reloads the original model_uri / model_state. The pipeline keeps using the old model, with no error or warning, and caches it under the new model's tag.
Repro: two LinearRegression models converted with skl2onnx, a.onnx (y = x) and b.onnx (y = 100x):
The prediction is 2.0 (model a). The same pipeline with SklearnModelHandlerNumpy and pickled models returns 200.0 with model_id set to b.pkl. The ONNX results also have model_id=None, because run_inference doesn't pass model_id to _convert_to_result.
The PyTorch, sklearn, TensorFlow and HuggingFace handlers implement update_model_path. Side-input model updates (#25200) and the ONNX handler (#24911) were merged a week apart in February 2023, and the XGBoost handler (#24965) a month later.
Expected: after the side input emits b.onnx, RunInference uses model b, as it does for the sklearn handler. I plan to add update_model_path to both handlers and set model_id on the ONNX results.
Activity
karthik-0306 commentedon Nov 16, 2026
.take-issue