multi groups in the constraints (#7711)

This commit is contained in:
Cheng Li
2022-03-01 02:10:15 -08:00
committed by GitHub
parent 1d468e20a4
commit a92e0f6240
2 changed files with 8 additions and 2 deletions

View File

@@ -1393,9 +1393,9 @@ class Booster:
+ ",".join(
[feature_idx_mapping[feature_name] for feature_name in constraint]
)
+ "]"
+ "],"
)
return s + "]"
return s[:-1] + "]"
except KeyError as e:
raise ValueError(
"Constrained features are not a subset of training data feature names"