From de00e07087565cfd6dadceef45dd6b08de324773 Mon Sep 17 00:00:00 2001 From: shlomota <73965390+shlomota@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:30:50 -0400 Subject: [PATCH] Fix misleading error when feature names are missing during inference (#10814) --- python-package/xgboost/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 8f6e560e4..dff608ce1 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -3129,7 +3129,7 @@ class Booster: if feature_names is None and self.feature_names is not None: raise ValueError( - "training data did not have the following fields: " + "data did not contain feature names, but the following fields are expected: " + ", ".join(self.feature_names) )