Fix misleading error when feature names are missing during inference (#10814)

This commit is contained in:
shlomota 2024-09-13 11:30:50 -04:00 committed by GitHub
parent 67c8c96784
commit de00e07087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3129,7 +3129,7 @@ class Booster:
if feature_names is None and self.feature_names is not None: if feature_names is None and self.feature_names is not None:
raise ValueError( 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) + ", ".join(self.feature_names)
) )