Compare commits
6 Commits
v1.1.1
...
release_1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15419d3fd9 | ||
|
|
4e1fba261d | ||
|
|
76d1b69664 | ||
|
|
1bf42c817a | ||
|
|
9ac614fe61 | ||
|
|
d6d8be6519 |
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -31,13 +31,14 @@ pipeline {
|
|||||||
|
|
||||||
// Build stages
|
// Build stages
|
||||||
stages {
|
stages {
|
||||||
stage('Jenkins Linux: Get sources') {
|
stage('Jenkins Linux: Initialize') {
|
||||||
agent { label 'linux && cpu' }
|
agent { label 'job_initializer' }
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
checkoutSrcs()
|
checkoutSrcs()
|
||||||
commit_id = "${GIT_COMMIT}"
|
commit_id = "${GIT_COMMIT}"
|
||||||
}
|
}
|
||||||
|
sh 'python3 tests/jenkins_get_approval.py'
|
||||||
stash name: 'srcs'
|
stash name: 'srcs'
|
||||||
milestone ordinal: 1
|
milestone ordinal: 1
|
||||||
}
|
}
|
||||||
@@ -324,25 +325,12 @@ def TestPythonGPU(args) {
|
|||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu
|
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu
|
||||||
"""
|
"""
|
||||||
if (args.cuda_version != '9.0') {
|
|
||||||
echo "Running tests with cuDF..."
|
|
||||||
sh """
|
|
||||||
${dockerRun} cudf ${docker_binary} ${docker_args} tests/ci_build/test_python.sh mgpu-cudf
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
echo "Using a single GPU"
|
echo "Using a single GPU"
|
||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh gpu
|
${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/test_python.sh gpu
|
||||||
"""
|
"""
|
||||||
if (args.cuda_version != '9.0') {
|
|
||||||
echo "Running tests with cuDF..."
|
|
||||||
sh """
|
|
||||||
${dockerRun} cudf ${docker_binary} ${docker_args} tests/ci_build/test_python.sh cudf
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// For CUDA 10.0 target, run cuDF tests too
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ pipeline {
|
|||||||
agent none
|
agent none
|
||||||
// Build stages
|
// Build stages
|
||||||
stages {
|
stages {
|
||||||
stage('Jenkins Win64: Get sources') {
|
stage('Jenkins Win64: Initialize') {
|
||||||
agent { label 'win64 && build' }
|
agent { label 'job_initializer' }
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
checkoutSrcs()
|
checkoutSrcs()
|
||||||
commit_id = "${GIT_COMMIT}"
|
commit_id = "${GIT_COMMIT}"
|
||||||
}
|
}
|
||||||
|
sh 'python3 tests/jenkins_get_approval.py'
|
||||||
stash name: 'srcs'
|
stash name: 'srcs'
|
||||||
milestone ordinal: 1
|
milestone ordinal: 1
|
||||||
}
|
}
|
||||||
@@ -40,7 +41,6 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
parallel ([
|
parallel ([
|
||||||
'test-win64-cpu': { TestWin64CPU() },
|
'test-win64-cpu': { TestWin64CPU() },
|
||||||
'test-win64-gpu-cuda10.0': { TestWin64GPU(cuda_target: 'cuda10_0') },
|
|
||||||
'test-win64-gpu-cuda10.1': { TestWin64GPU(cuda_target: 'cuda10_1') }
|
'test-win64-gpu-cuda10.1': { TestWin64GPU(cuda_target: 'cuda10_1') }
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ def TestWin64GPU(args) {
|
|||||||
"""
|
"""
|
||||||
echo "Installing Python dependencies..."
|
echo "Installing Python dependencies..."
|
||||||
bat """
|
bat """
|
||||||
conda activate && conda upgrade scikit-learn pandas numpy
|
conda activate && conda upgrade scikit-learn pandas numpy && python -m pip uninstall -y cupy-cuda100 cupy-cuda101 cupy-cuda102
|
||||||
"""
|
"""
|
||||||
echo "Running Python tests..."
|
echo "Running Python tests..."
|
||||||
bat """
|
bat """
|
||||||
|
|||||||
@@ -6,6 +6,6 @@
|
|||||||
|
|
||||||
#define XGBOOST_VER_MAJOR 1
|
#define XGBOOST_VER_MAJOR 1
|
||||||
#define XGBOOST_VER_MINOR 1
|
#define XGBOOST_VER_MINOR 1
|
||||||
#define XGBOOST_VER_PATCH 0
|
#define XGBOOST_VER_PATCH 1
|
||||||
|
|
||||||
#endif // XGBOOST_VERSION_CONFIG_H_
|
#endif // XGBOOST_VERSION_CONFIG_H_
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost-jvm_2.12</artifactId>
|
<artifactId>xgboost-jvm_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>XGBoost JVM Package</name>
|
<name>XGBoost JVM Package</name>
|
||||||
<description>JVM Package for XGBoost</description>
|
<description>JVM Package for XGBoost</description>
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost-jvm_2.12</artifactId>
|
<artifactId>xgboost-jvm_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>xgboost4j-example_2.12</artifactId>
|
<artifactId>xgboost4j-example_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost4j-spark_${scala.binary.version}</artifactId>
|
<artifactId>xgboost4j-spark_${scala.binary.version}</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.spark</groupId>
|
<groupId>org.apache.spark</groupId>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost4j-flink_${scala.binary.version}</artifactId>
|
<artifactId>xgboost4j-flink_${scala.binary.version}</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost-jvm_2.12</artifactId>
|
<artifactId>xgboost-jvm_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>xgboost4j-flink_2.12</artifactId>
|
<artifactId>xgboost4j-flink_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
<artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost-jvm_2.12</artifactId>
|
<artifactId>xgboost-jvm_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>xgboost4j-spark_2.12</artifactId>
|
<artifactId>xgboost4j-spark_2.12</artifactId>
|
||||||
<build>
|
<build>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
<artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.spark</groupId>
|
<groupId>org.apache.spark</groupId>
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ml.dmlc</groupId>
|
<groupId>ml.dmlc</groupId>
|
||||||
<artifactId>xgboost-jvm_2.12</artifactId>
|
<artifactId>xgboost-jvm_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>xgboost4j_2.12</artifactId>
|
<artifactId>xgboost4j_2.12</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ XGB_DLL int XGDMatrixSliceDMatrixEx(DMatrixHandle handle,
|
|||||||
<< "slice does not support group structure";
|
<< "slice does not support group structure";
|
||||||
}
|
}
|
||||||
DMatrix* dmat = static_cast<std::shared_ptr<DMatrix>*>(handle)->get();
|
DMatrix* dmat = static_cast<std::shared_ptr<DMatrix>*>(handle)->get();
|
||||||
*out = new std::shared_ptr<DMatrix>(dmat->Slice({idxset, len}));
|
*out = new std::shared_ptr<DMatrix>(dmat->Slice({idxset, static_cast<std::size_t>(len)}));
|
||||||
API_END();
|
API_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
ARG CUDA_VERSION
|
|
||||||
FROM nvidia/cuda:$CUDA_VERSION-runtime-ubuntu16.04
|
|
||||||
|
|
||||||
# Environment
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
|
||||||
|
|
||||||
# Install all basic requirements
|
|
||||||
RUN \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y wget unzip bzip2 libgomp1 build-essential && \
|
|
||||||
# Python
|
|
||||||
wget -O Miniconda3.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
|
||||||
bash Miniconda3.sh -b -p /opt/python
|
|
||||||
|
|
||||||
ENV PATH=/opt/python/bin:$PATH
|
|
||||||
|
|
||||||
# Create new Conda environment with cuDF, Dask, and cuPy
|
|
||||||
RUN \
|
|
||||||
conda create -n cudf_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
|
||||||
python=3.7 cudf cudatoolkit=$CUDA_VERSION dask dask-cuda dask-cudf cupy \
|
|
||||||
numpy pytest scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz
|
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.10
|
|
||||||
|
|
||||||
# Install lightweight sudo (not bound to TTY)
|
|
||||||
RUN set -ex; \
|
|
||||||
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \
|
|
||||||
chmod +x /usr/local/bin/gosu && \
|
|
||||||
gosu nobody true
|
|
||||||
|
|
||||||
# Default entry-point to use if running locally
|
|
||||||
# It will preserve attributes of created files
|
|
||||||
COPY entrypoint.sh /scripts/
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
ENTRYPOINT ["/scripts/entrypoint.sh"]
|
|
||||||
@@ -3,6 +3,7 @@ FROM nvidia/cuda:$CUDA_VERSION-runtime-ubuntu16.04
|
|||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
SHELL ["/bin/bash", "-c"] # Use Bash as shell
|
||||||
|
|
||||||
# Install all basic requirements
|
# Install all basic requirements
|
||||||
RUN \
|
RUN \
|
||||||
@@ -14,11 +15,11 @@ RUN \
|
|||||||
|
|
||||||
ENV PATH=/opt/python/bin:$PATH
|
ENV PATH=/opt/python/bin:$PATH
|
||||||
|
|
||||||
# Install Python packages
|
# Create new Conda environment with cuDF, Dask, and cuPy
|
||||||
RUN \
|
RUN \
|
||||||
conda create -n gpu_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
conda create -n gpu_test -c rapidsai -c nvidia -c conda-forge -c defaults \
|
||||||
python=3.7 dask dask-cuda numpy pytest scipy scikit-learn pandas \
|
python=3.7 cudf=0.14 cudatoolkit=$CUDA_VERSION dask dask-cuda dask-cudf cupy \
|
||||||
matplotlib wheel python-kubernetes urllib3 graphviz
|
numpy pytest scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz
|
||||||
|
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|
||||||
|
|||||||
@@ -44,20 +44,6 @@ case "$suite" in
|
|||||||
cd -
|
cd -
|
||||||
;;
|
;;
|
||||||
|
|
||||||
cudf)
|
|
||||||
source activate cudf_test
|
|
||||||
install_xgboost
|
|
||||||
pytest -v -s -rxXs --fulltrace -m "not mgpu" \
|
|
||||||
tests/python-gpu/test_from_cudf.py tests/python-gpu/test_from_cupy.py \
|
|
||||||
tests/python-gpu/test_gpu_prediction.py
|
|
||||||
;;
|
|
||||||
|
|
||||||
mgpu-cudf)
|
|
||||||
source activate cudf_test
|
|
||||||
install_xgboost
|
|
||||||
pytest -v -s -rxXs --fulltrace -m "mgpu" tests/python-gpu/test_gpu_with_dask.py
|
|
||||||
;;
|
|
||||||
|
|
||||||
cpu)
|
cpu)
|
||||||
install_xgboost
|
install_xgboost
|
||||||
pytest -v -s --fulltrace tests/python
|
pytest -v -s --fulltrace tests/python
|
||||||
@@ -72,7 +58,7 @@ case "$suite" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu|cpu-py35}"
|
echo "Usage: $0 {gpu|mgpu|cpu|cpu-py35}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
26
tests/jenkins_get_approval.py
Normal file
26
tests/jenkins_get_approval.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import boto3
|
||||||
|
import json
|
||||||
|
|
||||||
|
lambda_client = boto3.client('lambda', region_name='us-west-2')
|
||||||
|
|
||||||
|
# Source code for the Lambda function is available at https://github.com/hcho3/xgboost-devops
|
||||||
|
r = lambda_client.invoke(
|
||||||
|
FunctionName='XGBoostCICostWatcher',
|
||||||
|
InvocationType='RequestResponse',
|
||||||
|
Payload='{}'.encode('utf-8')
|
||||||
|
)
|
||||||
|
|
||||||
|
payload = r['Payload'].read().decode('utf-8')
|
||||||
|
if 'FunctionError' in r:
|
||||||
|
msg = 'Error when invoking the Lambda function. Stack trace:\n'
|
||||||
|
error = json.loads(payload)
|
||||||
|
msg += f" {error['errorType']}: {error['errorMessage']}\n"
|
||||||
|
for trace in error['stackTrace']:
|
||||||
|
for line in trace.split('\n'):
|
||||||
|
msg += f' {line}\n'
|
||||||
|
raise RuntimeError(msg)
|
||||||
|
response = json.loads(payload)
|
||||||
|
if response['approved']:
|
||||||
|
print(f"Testing approved. Reason: {response['reason']}")
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f"Testing rejected. Reason: {response['reason']}")
|
||||||
Reference in New Issue
Block a user