2023-07-06 04:06:12 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-04-23 03:28:51 +03:00
|
|
|
set -e -E -u -o pipefail
|
|
|
|
|
2023-07-06 04:06:12 +03:00
|
|
|
# oldest versions of dependencies published after
|
2024-05-27 23:27:39 +03:00
|
|
|
# minimum supported Python version's first release,
|
|
|
|
# for which there are wheels compatible with the
|
|
|
|
# python:{version} image
|
2023-07-06 04:06:12 +03:00
|
|
|
#
|
|
|
|
# see https://devguide.python.org/versions/
|
|
|
|
#
|
|
|
|
echo "installing lightgbm's dependencies"
|
|
|
|
pip install \
|
2023-11-01 16:21:48 +03:00
|
|
|
'cffi==1.15.1' \
|
2024-05-27 23:27:39 +03:00
|
|
|
'numpy==1.19.0' \
|
|
|
|
'pandas==1.1.3' \
|
2023-11-01 16:21:48 +03:00
|
|
|
'pyarrow==6.0.1' \
|
2024-10-10 02:46:26 +03:00
|
|
|
'scikit-learn==0.24.2' \
|
2024-05-27 23:27:39 +03:00
|
|
|
'scipy==1.6.0' \
|
2024-02-10 07:42:00 +03:00
|
|
|
|| exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
echo "done installing lightgbm's dependencies"
|
|
|
|
|
|
|
|
echo "installing lightgbm"
|
2024-02-10 07:42:00 +03:00
|
|
|
pip install --no-deps dist/*.whl || exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
echo "done installing lightgbm"
|
|
|
|
|
|
|
|
echo "installed package versions:"
|
|
|
|
pip freeze
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "checking that examples run without error"
|
|
|
|
|
2024-10-07 05:49:20 +03:00
|
|
|
# run a few examples to test that Python-package minimally works
|
2023-07-06 04:06:12 +03:00
|
|
|
echo ""
|
|
|
|
echo "--- advanced_example.py ---"
|
|
|
|
echo ""
|
2024-02-10 07:42:00 +03:00
|
|
|
python ./examples/python-guide/advanced_example.py || exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--- logistic_regression.py ---"
|
|
|
|
echo ""
|
2024-02-10 07:42:00 +03:00
|
|
|
python ./examples/python-guide/logistic_regression.py || exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--- simple_example.py ---"
|
|
|
|
echo ""
|
2024-02-10 07:42:00 +03:00
|
|
|
python ./examples/python-guide/simple_example.py || exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--- sklearn_example.py ---"
|
|
|
|
echo ""
|
2024-02-10 07:42:00 +03:00
|
|
|
python ./examples/python-guide/sklearn_example.py || exit 1
|
2023-07-06 04:06:12 +03:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "done testing on oldest supported Python version"
|