microsoft / LightGBM

A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
https://lightgbm.readthedocs.io/en/latest/
MIT License
16.56k stars 3.82k forks source link

Tests fail to open the file examples/binary_classification/binary.test #6486

Closed yurivict closed 2 months ago

yurivict commented 3 months ago

Description

Many tests succeed, but then they fail to find the file examples/binary_classification/binary.test:

[==========] Running 30 tests from 8 test suites.
[----------] Global test environment set-up.
[----------] 4 tests from Partition
[ RUN      ] Partition.JustWorks
[       OK ] Partition.JustWorks (0 ms)
[ RUN      ] Partition.PartitionOneElement
[       OK ] Partition.PartitionOneElement (0 ms)
[ RUN      ] Partition.Empty
[       OK ] Partition.Empty (0 ms)
[ RUN      ] Partition.AllEqual
[       OK ] Partition.AllEqual (0 ms)
[----------] 4 tests from Partition (0 ms total)

[----------] 5 tests from ArrowChunkedArrayTest
[ RUN      ] ArrowChunkedArrayTest.GetLength
[       OK ] ArrowChunkedArrayTest.GetLength (0 ms)
[ RUN      ] ArrowChunkedArrayTest.GetColumns
[       OK ] ArrowChunkedArrayTest.GetColumns (0 ms)
[ RUN      ] ArrowChunkedArrayTest.IteratorArithmetic
[       OK ] ArrowChunkedArrayTest.IteratorArithmetic (0 ms)
[ RUN      ] ArrowChunkedArrayTest.BooleanIterator
[       OK ] ArrowChunkedArrayTest.BooleanIterator (0 ms)
[ RUN      ] ArrowChunkedArrayTest.OffsetAndValidity
[       OK ] ArrowChunkedArrayTest.OffsetAndValidity (0 ms)
[----------] 5 tests from ArrowChunkedArrayTest (0 ms total)

[----------] 1 test from ByteBuffer
[ RUN      ] ByteBuffer.JustWorks
[       OK ] ByteBuffer.JustWorks (0 ms)
[----------] 1 test from ByteBuffer (0 ms total)

[----------] 11 tests from ChunkedArrayTest
[ RUN      ] ChunkedArrayTest.constructorWithChunkSize0Throws
[LightGBM] [Fatal] ChunkedArray chunk size must be larger than 0!
[       OK ] ChunkedArrayTest.constructorWithChunkSize0Throws (0 ms)
[ RUN      ] ChunkedArrayTest.constructorWithChunkSize
[       OK ] ChunkedArrayTest.constructorWithChunkSize (0 ms)
[ RUN      ] ChunkedArrayTest.getChunkSizeIsConstant
[       OK ] ChunkedArrayTest.getChunkSizeIsConstant (0 ms)
[ RUN      ] ChunkedArrayTest.getChunksCount
[       OK ] ChunkedArrayTest.getChunksCount (0 ms)
[ RUN      ] ChunkedArrayTest.getAddCount
[       OK ] ChunkedArrayTest.getAddCount (0 ms)
[ RUN      ] ChunkedArrayTest.coalesceTo
[       OK ] ChunkedArrayTest.coalesceTo (0 ms)
[ RUN      ] ChunkedArrayTest.clear
[       OK ] ChunkedArrayTest.clear (0 ms)
[ RUN      ] ChunkedArrayTest.doubleFreeSafe
[       OK ] ChunkedArrayTest.doubleFreeSafe (0 ms)
[ RUN      ] ChunkedArrayTest.totalArraySizeMatchesLastChunkAddCount
[       OK ] ChunkedArrayTest.totalArraySizeMatchesLastChunkAddCount (0 ms)
[ RUN      ] ChunkedArrayTest.dataLayoutTestThroughGetitem
[       OK ] ChunkedArrayTest.dataLayoutTestThroughGetitem (0 ms)
[ RUN      ] ChunkedArrayTest.testDataLayoutWithAdvancedInsertionAPI
[       OK ] ChunkedArrayTest.testDataLayoutWithAdvancedInsertionAPI (0 ms)
[----------] 11 tests from ChunkedArrayTest (0 ms total)

[----------] 5 tests from AtofPreciseTest
[ RUN      ] AtofPreciseTest.Basic
[       OK ] AtofPreciseTest.Basic (0 ms)
[ RUN      ] AtofPreciseTest.CornerCases
[LightGBM] [Warning] convert to double got underflow or overflow: 179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792
[       OK ] AtofPreciseTest.CornerCases (0 ms)
[ RUN      ] AtofPreciseTest.ErrorInput
[LightGBM] [Fatal] no conversion to double for: x1
[       OK ] AtofPreciseTest.ErrorInput (0 ms)
[ RUN      ] AtofPreciseTest.NaN
[       OK ] AtofPreciseTest.NaN (0 ms)
[ RUN      ] AtofPreciseTest.Inf
[       OK ] AtofPreciseTest.Inf (0 ms)
[----------] 5 tests from AtofPreciseTest (0 ms total)

[----------] 1 test from Serialization
[ RUN      ] Serialization.JustWorks
[LightGBM] [Info] Debug sample data path: examples/binary_classification/binary.test
[LightGBM] [Fatal] Cannot open data file examples/binary_classification/binary.test
/usr/ports/misc/lightgbm/work/LightGBM-4.4.0/tests/cpp_tests/test_serialize.cpp:25: Failure
Expected equality of these values:
  0
  result
    Which is: -1
LoadDatasetFromExamples result code: -1

[LightGBM] [Info] Saving data reference to binary buffer
/usr/ports/misc/lightgbm/work/LightGBM-4.4.0/tests/cpp_tests/test_serialize.cpp:37: Failure
Expected equality of these values:
  0
  result
    Which is: -1
LGBM_DatasetSerializeReferenceToBinary result code: -1

[LightGBM] [Fatal] Check failed: (num_data) > (0) at /usr/ports/misc/lightgbm/work/LightGBM-4.4.0/src/io/dataset.cpp, line 39 .

/usr/ports/misc/lightgbm/work/LightGBM-4.4.0/tests/cpp_tests/test_serialize.cpp:52: Failure
Expected equality of these values:
  0
  result
    Which is: -1
LGBM_DatasetCreateFromSerializedReference result code: -1

*** Signal 11

Stop.
make: stopped in /usr/ports/misc/lightgbm

Reproducible example

Environment info

LightGBM version or commit hash:

Command(s) you used to install LightGBM

Version: 4.4.0 FreeBSD 14.1

jameslamb commented 3 months ago

Thanks for using LightGBM and for your work repackaging it for FreeBSD.

To run the C++ tests for this project, run the following from the root of the repo:

cmake -B build -S . -DBUILD_CPP_TEST=ON
cmake --build build --target testlightgbm -j4
./testlightgbm

I suspect you're running them from a different working directory, as LightGBM's CI jobs did prior to #6368.

As I said the last time you opened a report like this, it's really difficult to help with only a bit of logs and a version number (https://github.com/microsoft/LightGBM/issues/5976#issuecomment-1636077782). The next time you open a report like this here, please provide enough information for us to reproduce the issue (like the exact commands you ran).

github-actions[bot] commented 2 months ago

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. Thank you for taking the time to improve LightGBM!