Skip to content

Commit

Permalink
Merge pull request optuna#2997 from himkt/fix/lightgbm
Browse files Browse the repository at this point in the history
Wrap data with np.asarray in lightgbm test
  • Loading branch information
HideakiImamura authored Oct 11, 2021
2 parents 36a2f74 + 6172b80 commit 60fd6dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration_tests/test_lightgbm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from functools import partial

import lightgbm as lgb
import numpy as np
import pytest

import optuna
Expand Down Expand Up @@ -116,8 +117,8 @@ def objective(
cv: bool = False,
) -> float:

dtrain = lgb.Dataset([[1.0], [2.0], [3.0]], label=[1.0, 0.0, 1.0])
dtest = lgb.Dataset([[1.0]], label=[1.0])
dtrain = lgb.Dataset(np.asarray([[1.0], [2.0], [3.0]]), label=[1.0, 0.0, 1.0])
dtest = lgb.Dataset(np.asarray([[1.0]]), label=[1.0])

if force_default_valid_names:
valid_names = None
Expand Down

0 comments on commit 60fd6dc

Please sign in to comment.