Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: xadupre <[email protected]>
  • Loading branch information
xadupre committed Dec 22, 2024
1 parent 20c3728 commit 7126dc2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/xgboost/test_xgboost_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,13 @@ def test_xgboost_classifier_i5450_softmax(self):
iris = load_iris()
X, y = iris.data, iris.target
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=10)
clr = XGBClassifier(objective="multi:softmax", max_depth=1, n_estimators=2)
clr.fit(X_train, y_train, eval_set=[(X_test, y_test)], early_stopping_rounds=40)
clr = XGBClassifier(
objective="multi:softmax",
max_depth=1,
n_estimators=2,
early_stopping_rounds=40,
)
clr.fit(X_train, y_train, eval_set=[(X_test, y_test)])
initial_type = [("float_input", FloatTensorType([None, 4]))]
onx = convert_xgboost(
clr, initial_types=initial_type, target_opset=TARGET_OPSET
Expand Down

0 comments on commit 7126dc2

Please sign in to comment.