Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
fcf76bce
Unverified
Commit
fcf76bce
authored
Oct 26, 2023
by
James Lamb
Committed by
GitHub
Oct 26, 2023
Browse files
[ci] resolve warning in tests (#6154)
parent
2d358d5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
tests/python_package_test/test_engine.py
tests/python_package_test/test_engine.py
+8
-8
No files found.
tests/python_package_test/test_engine.py
View file @
fcf76bce
...
@@ -853,7 +853,7 @@ def test_ranking_with_position_information_with_file(tmp_path):
...
@@ -853,7 +853,7 @@ def test_ranking_with_position_information_with_file(tmp_path):
file
.
close
()
file
.
close
()
lgb_train
=
lgb
.
Dataset
(
str
(
tmp_path
/
'rank.train'
),
params
=
params
)
lgb_train
=
lgb
.
Dataset
(
str
(
tmp_path
/
'rank.train'
),
params
=
params
)
lgb_valid
=
[
lgb_train
.
create_valid
(
str
(
tmp_path
/
'rank.test'
))]
lgb_valid
=
[
lgb_train
.
create_valid
(
str
(
tmp_path
/
'rank.test'
))]
with
pytest
.
raises
(
lgb
.
basic
.
LightGBMError
,
match
=
"Positions size \(3006\) doesn't match data size"
):
with
pytest
.
raises
(
lgb
.
basic
.
LightGBMError
,
match
=
r
"Positions size \(3006\) doesn't match data size"
):
lgb
.
train
(
params
,
lgb_train
,
valid_sets
=
lgb_valid
,
num_boost_round
=
50
)
lgb
.
train
(
params
,
lgb_train
,
valid_sets
=
lgb_valid
,
num_boost_round
=
50
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment