Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74e2f652de | ||
|
|
e02fff53f2 | ||
|
|
fcb2efbadd | ||
|
|
f4621f09c7 | ||
|
|
bf1b2cbfa2 |
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(xgboost LANGUAGES CXX C VERSION 1.0.0)
|
||||
project(xgboost LANGUAGES CXX C VERSION 1.0.1)
|
||||
include(cmake/Utils.cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH "${xgboost_SOURCE_DIR}/cmake/modules")
|
||||
cmake_policy(SET CMP0022 NEW)
|
||||
|
||||
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -273,6 +273,7 @@ def TestPythonCPU() {
|
||||
def docker_binary = "docker"
|
||||
sh """
|
||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/test_python.sh cpu
|
||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/test_python.sh cpu-py35
|
||||
"""
|
||||
deleteDir()
|
||||
}
|
||||
|
||||
@@ -195,12 +195,22 @@
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "array",
|
||||
"const": [
|
||||
1,
|
||||
0,
|
||||
0
|
||||
"items": [
|
||||
{
|
||||
"type": "number",
|
||||
"const": 1
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
}
|
||||
],
|
||||
"additionalItems": false
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"learner": {
|
||||
"type": "object",
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
#define XGBOOST_VER_MAJOR 1
|
||||
#define XGBOOST_VER_MINOR 0
|
||||
#define XGBOOST_VER_PATCH 0
|
||||
#define XGBOOST_VER_PATCH 1
|
||||
|
||||
#endif // XGBOOST_VERSION_CONFIG_H_
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.0
|
||||
1.0.1
|
||||
|
||||
@@ -5,6 +5,8 @@ Contributors: https://github.com/dmlc/xgboost/blob/master/CONTRIBUTORS.md
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from .core import DMatrix, Booster
|
||||
from .training import train, cv
|
||||
@@ -19,6 +21,12 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if sys.version_info[:2] == (3, 5):
|
||||
warnings.warn(
|
||||
'Python 3.5 support is deprecated; XGBoost will require Python 3.6+ in the near future. ' +
|
||||
'Consider upgrading to Python 3.6+.',
|
||||
FutureWarning)
|
||||
|
||||
VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION')
|
||||
with open(VERSION_FILE) as f:
|
||||
__version__ = f.read().strip()
|
||||
|
||||
@@ -434,8 +434,8 @@ class XGBModel(XGBModelBase):
|
||||
self.classes_ = np.array(v)
|
||||
continue
|
||||
if k == 'type' and type(self).__name__ != v:
|
||||
msg = f'Current model type: {type(self).__name__}, ' + \
|
||||
f'type of model in file: {v}'
|
||||
msg = 'Current model type: {}, '.format(type(self).__name__) + \
|
||||
'type of model in file: {}'.format(v)
|
||||
raise TypeError(msg)
|
||||
if k == 'type':
|
||||
continue
|
||||
|
||||
@@ -3,6 +3,7 @@ ARG CMAKE_VERSION=3.12
|
||||
|
||||
# Environment
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
||||
|
||||
# Install all basic requirements
|
||||
RUN \
|
||||
@@ -19,10 +20,16 @@ ENV PATH=/opt/python/bin:$PATH
|
||||
|
||||
ENV GOSU_VERSION 1.10
|
||||
|
||||
# Install Python packages
|
||||
# Create new Conda environment with Python 3.5
|
||||
RUN conda create -n py35 python=3.5 && \
|
||||
source activate py35 && \
|
||||
pip install numpy pytest scipy scikit-learn pandas matplotlib wheel kubernetes urllib3 graphviz && \
|
||||
source deactivate
|
||||
|
||||
# Install Python packages in default env
|
||||
RUN \
|
||||
pip install pyyaml cpplint pylint astroid sphinx numpy scipy pandas matplotlib sh \
|
||||
recommonmark guzzle_sphinx_theme mock breathe matplotlib graphviz \
|
||||
recommonmark guzzle_sphinx_theme mock breathe graphviz \
|
||||
pytest scikit-learn wheel kubernetes urllib3 jsonschema boto3 && \
|
||||
pip install https://h2o-release.s3.amazonaws.com/datatable/stable/datatable-0.7.0/datatable-0.7.0-cp37-cp37m-linux_x86_64.whl && \
|
||||
pip install "dask[complete]"
|
||||
|
||||
@@ -5,31 +5,35 @@ set -x
|
||||
suite=$1
|
||||
|
||||
# Install XGBoost Python package
|
||||
wheel_found=0
|
||||
for file in python-package/dist/*.whl
|
||||
do
|
||||
if [ -e "${file}" ]
|
||||
function install_xgboost {
|
||||
wheel_found=0
|
||||
for file in python-package/dist/*.whl
|
||||
do
|
||||
if [ -e "${file}" ]
|
||||
then
|
||||
pip install --user "${file}"
|
||||
wheel_found=1
|
||||
break # need just one
|
||||
fi
|
||||
done
|
||||
if [ "$wheel_found" -eq 0 ]
|
||||
then
|
||||
pip install --user "${file}"
|
||||
wheel_found=1
|
||||
break # need just one
|
||||
pushd .
|
||||
cd python-package
|
||||
python setup.py install --user
|
||||
popd
|
||||
fi
|
||||
done
|
||||
if [ "$wheel_found" -eq 0 ]
|
||||
then
|
||||
pushd .
|
||||
cd python-package
|
||||
python setup.py install --user
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
# Run specified test suite
|
||||
case "$suite" in
|
||||
gpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "not mgpu" tests/python-gpu
|
||||
;;
|
||||
|
||||
mgpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "mgpu" tests/python-gpu
|
||||
cd tests/distributed
|
||||
./runtests-gpu.sh
|
||||
@@ -39,17 +43,25 @@ case "$suite" in
|
||||
|
||||
cudf)
|
||||
source activate cudf_test
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "not mgpu" tests/python-gpu/test_from_columnar.py tests/python-gpu/test_from_cupy.py
|
||||
;;
|
||||
|
||||
cpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace tests/python
|
||||
cd tests/distributed
|
||||
./runtests.sh
|
||||
;;
|
||||
|
||||
cpu-py35)
|
||||
source activate py35
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace tests/python
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu}"
|
||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu|cpu-py35}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -54,7 +54,7 @@ TEST(Version, Basic) {
|
||||
|
||||
ptr = 0;
|
||||
v = std::stoi(str, &ptr);
|
||||
ASSERT_EQ(v, XGBOOST_VER_MINOR) << "patch: " << v;;
|
||||
ASSERT_EQ(v, XGBOOST_VER_PATCH) << "patch: " << v;;
|
||||
|
||||
str = str.substr(ptr);
|
||||
ASSERT_EQ(str.size(), 0);
|
||||
|
||||
Reference in New Issue
Block a user