Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Remove python2 from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Jan 25, 2020
1 parent e1779f4 commit 79d79d5
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 319 deletions.
97 changes: 0 additions & 97 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ build_ubuntu_cpu_openblas() {
USE_LIBJPEG_TURBO=1 \
USE_SIGNAL_HANDLER=1 \
-j$(nproc)
make cython PYTHON=python2
make cython PYTHON=python3
}

Expand Down Expand Up @@ -808,7 +807,6 @@ build_ubuntu_gpu_cuda101_cudnn7_no_tvm_op() {
USE_SIGNAL_HANDLER=1 \
-j$(nproc)

make cython PYTHON=python2
make cython PYTHON=python3
}

Expand Down Expand Up @@ -998,34 +996,10 @@ cd_unittest_ubuntu() {
fi
}

unittest_ubuntu_python2_cpu_cython() {
set -ex
export PYTHONPATH=./python/
export MXNET_MKLDNN_DEBUG=1
export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
export MXNET_SUBGRAPH_VERBOSE=0
export MXNET_ENABLE_CYTHON=1
export MXNET_ENFORCE_CYTHON=1
export DMLC_LOG_STACK_TRACE_DEPTH=10
check_cython 2
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_unittest.xml --verbose tests/python/unittest
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_train.xml --verbose tests/python/train
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_quantization.xml --verbose tests/python/quantization
}

unittest_ubuntu_python2_cpu() {
set -ex
export PYTHONPATH=./python/
export MXNET_MKLDNN_DEBUG=0
export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
export MXNET_SUBGRAPH_VERBOSE=0
export MXNET_ENABLE_CYTHON=0
export DMLC_LOG_STACK_TRACE_DEPTH=10
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_unittest.xml --verbose tests/python/unittest
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_train.xml --verbose tests/python/train
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_quantization.xml --verbose tests/python/quantization
}

unittest_ubuntu_python3_cpu() {
set -ex
export PYTHONPATH=./python/
Expand All @@ -1050,17 +1024,8 @@ unittest_ubuntu_python3_cpu_mkldnn() {
nosetests-3.4 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_mkl.xml --verbose tests/python/mkl
}

unittest_ubuntu_python2_gpu() {
set -ex
export PYTHONPATH=./python/
export MXNET_MKLDNN_DEBUG=0 # Ignored if not present
export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
export MXNET_SUBGRAPH_VERBOSE=0
export CUDNN_VERSION=${CUDNN_VERSION:-7.0.3}
export DMLC_LOG_STACK_TRACE_DEPTH=10
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_gpu.xml --verbose tests/python/gpu
}

unittest_ubuntu_python3_gpu() {
set -ex
export PYTHONPATH=./python/
Expand Down Expand Up @@ -1112,20 +1077,8 @@ unittest_ubuntu_tensorrt_gpu() {
}

# quantization gpu currently only runs on P3 instances
# need to separte it from unittest_ubuntu_python2_gpu()
unittest_ubuntu_python2_quantization_gpu() {
set -ex
export PYTHONPATH=./python/
export MXNET_MKLDNN_DEBUG=0 # Ignored if not present
export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
export MXNET_SUBGRAPH_VERBOSE=0
export CUDNN_VERSION=${CUDNN_VERSION:-7.0.3}
export MXNET_ENABLE_CYTHON=0
export DMLC_LOG_STACK_TRACE_DEPTH=10
nosetests-2.7 $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_quantization_gpu.xml --verbose tests/python/quantization_gpu
}

# quantization gpu currently only runs on P3 instances
# need to separte it from unittest_ubuntu_python3_gpu()
unittest_ubuntu_python3_quantization_gpu() {
set -ex
Expand Down Expand Up @@ -1375,24 +1328,7 @@ integrationtest_ubuntu_gpu_dist_kvstore() {
popd
}

test_ubuntu_cpu_python2() {
set -ex
pushd .
export MXNET_LIBRARY_PATH=/work/build/libmxnet.so
export DMLC_LOG_STACK_TRACE_DEPTH=10

VENV=mxnet_py2_venv
virtualenv -p `which python2` $VENV
source $VENV/bin/activate
pip install nose nose-timer

cd /work/mxnet/python
pip install -e .
cd /work/mxnet
python -m "nose" $NOSE_COVERAGE_ARGUMENTS $NOSE_TIMER_ARGUMENTS --verbose tests/python/unittest
popd
}

test_ubuntu_cpu_python3() {
set -ex
pushd .
Expand Down Expand Up @@ -1544,17 +1480,7 @@ nightly_model_backwards_compat_train() {
./tests/nightly/model_backwards_compatibility_check/train_mxnet_legacy_models.sh
}

# Nightly 'MXNet: The Straight Dope' Single-GPU Tests
nightly_straight_dope_python2_single_gpu_tests() {
set -ex
cd /work/mxnet/tests/nightly/straight_dope
export PYTHONPATH=/work/mxnet/python/
export MXNET_TEST_KERNEL=python2
export DMLC_LOG_STACK_TRACE_DEPTH=10
nosetests-2.7 $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_straight_dope_python2_single_gpu.xml \
test_notebooks_single_gpu.py --nologcapture
}

nightly_straight_dope_python3_single_gpu_tests() {
set -ex
cd /work/mxnet/tests/nightly/straight_dope
Expand All @@ -1565,17 +1491,7 @@ nightly_straight_dope_python3_single_gpu_tests() {
test_notebooks_single_gpu.py --nologcapture
}

# Nightly 'MXNet: The Straight Dope' Multi-GPU Tests
nightly_straight_dope_python2_multi_gpu_tests() {
set -ex
cd /work/mxnet/tests/nightly/straight_dope
export PYTHONPATH=/work/mxnet/python/
export MXNET_TEST_KERNEL=python2
export DMLC_LOG_STACK_TRACE_DEPTH=10
nosetests-2.7 $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_straight_dope_python2_multi_gpu.xml \
test_notebooks_multi_gpu.py --nologcapture
}

nightly_straight_dope_python3_multi_gpu_tests() {
set -ex
cd /work/mxnet/tests/nightly/straight_dope
Expand All @@ -1601,21 +1517,8 @@ nightly_tutorial_test_ubuntu_python3_gpu() {
nosetests-3.4 $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_tutorials.xml test_tutorials.py --nologcapture
}

nightly_tutorial_test_ubuntu_python2_gpu() {
set -ex
cd /work/mxnet/docs
export BUILD_VER=tutorial
export MXNET_DOCS_BUILD_MXNET=0
export DMLC_LOG_STACK_TRACE_DEPTH=10
make html
export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
export MXNET_SUBGRAPH_VERBOSE=0
export PYTHONPATH=/work/mxnet/python/
export MXNET_TUTORIAL_TEST_KERNEL=python2
cd /work/mxnet/tests/tutorials
nosetests-3.4 $NOSE_TIMER_ARGUMENTS --with-xunit --xunit-file nosetests_tutorials.xml test_tutorials.py --nologcapture
}

nightly_java_demo_test_cpu() {
set -ex
cd /work/mxnet/scala-package/mxnet-demo/java-demo
Expand Down
143 changes: 0 additions & 143 deletions ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ mx_lib_cpp_examples_no_tvm_op = 'lib/libmxnet.so, lib/libmxnet.a, libsample_lib.
mx_lib_cpp_examples_cpu = 'build/libmxnet.so, build/3rdparty/tvm/libtvm_runtime.so, build/libtvmop.so, build/tvmop.conf, build/cpp-package/example/*'

// Python unittest for CPU
// Python 2
def python2_ut(docker_container_name) {
timeout(time: max_time, unit: 'MINUTES') {
utils.docker_run(docker_container_name, 'unittest_ubuntu_python2_cpu', false)
}
}

def python2_ut_cython(docker_container_name) {
timeout(time: max_time, unit: 'MINUTES') {
utils.docker_run(docker_container_name, 'unittest_ubuntu_python2_cpu_cython', false)
}
}

// Python 3
def python3_ut(docker_container_name) {
timeout(time: max_time, unit: 'MINUTES') {
Expand All @@ -78,13 +65,6 @@ def python3_ut_mkldnn(docker_container_name) {

// GPU test has two parts. 1) run unittest on GPU, 2) compare the results on
// both CPU and GPU
// Python 2
def python2_gpu_ut(docker_container_name) {
timeout(time: max_time, unit: 'MINUTES') {
utils.docker_run(docker_container_name, 'unittest_ubuntu_python2_gpu', true)
}
}

// Python 3
def python3_gpu_ut(docker_container_name) {
timeout(time: max_time, unit: 'MINUTES') {
Expand Down Expand Up @@ -681,74 +661,6 @@ def test_static_python_gpu() {
}]
}

def test_unix_python2_cpu() {
return ['Python2: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/ut-python2-cpu') {
try {
utils.unpack_and_init('cpu', mx_lib_cython)
python2_ut_cython('ubuntu_cpu')
utils.publish_test_coverage()
} finally {
utils.collect_test_results_unix('nosetests_unittest.xml', 'nosetests_python2_cpu_unittest.xml')
utils.collect_test_results_unix('nosetests_train.xml', 'nosetests_python2_cpu_train.xml')
utils.collect_test_results_unix('nosetests_quantization.xml', 'nosetests_python2_cpu_quantization.xml')
}
}
}
}]
}

def test_unix_python2_gpu() {
return ['Python2: GPU': {
node(NODE_LINUX_GPU) {
ws('workspace/ut-python2-gpu') {
try {
utils.unpack_and_init('gpu', mx_lib)
python2_gpu_ut('ubuntu_gpu_cu101')
utils.publish_test_coverage()
} finally {
utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python2_gpu.xml')
}
}
}
}]
}

def test_unix_python2_quantize_gpu() {
return ['Python2: Quantize GPU': {
node(NODE_LINUX_GPU_P3) {
ws('workspace/ut-python2-quantize-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
try {
utils.unpack_and_init('gpu', mx_lib)
utils.docker_run('ubuntu_gpu_cu101', 'unittest_ubuntu_python2_quantization_gpu', true)
utils.publish_test_coverage()
} finally {
utils.collect_test_results_unix('nosetests_quantization_gpu.xml', 'nosetests_python2_quantize_gpu.xml')
}
}
}
}
}]
}

def test_unix_python2_mkldnn_gpu() {
return ['Python2: MKLDNN-GPU': {
node(NODE_LINUX_GPU) {
ws('workspace/ut-python2-mkldnn-gpu') {
try {
utils.unpack_and_init('mkldnn_gpu', mx_mkldnn_lib)
python2_gpu_ut('ubuntu_gpu_cu101')
utils.publish_test_coverage()
} finally {
utils.collect_test_results_unix('nosetests_gpu.xml', 'nosetests_python2_mkldnn_gpu.xml')
}
}
}
}]
}

def test_unix_python3_cpu() {
return ['Python3: CPU': {
node(NODE_LINUX_CPU) {
Expand Down Expand Up @@ -865,24 +777,6 @@ def test_unix_python3_cpu_no_tvm_op() {
}]
}

def test_unix_python2_mkldnn_cpu() {
return ['Python2: MKLDNN-CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/ut-python2-mkldnn-cpu') {
try {
utils.unpack_and_init('mkldnn_cpu', mx_mkldnn_lib)
python2_ut('ubuntu_cpu')
utils.publish_test_coverage()
} finally {
utils.collect_test_results_unix('nosetests_unittest.xml', 'nosetests_python2_mkldnn_cpu_unittest.xml')
utils.collect_test_results_unix('nosetests_train.xml', 'nosetests_python2_mkldnn_cpu_train.xml')
utils.collect_test_results_unix('nosetests_quantization.xml', 'nosetests_python2_mkldnn_cpu_quantization.xml')
}
}
}
}]
}

def test_unix_python3_mkldnn_cpu() {
return ['Python3: MKLDNN-CPU': {
node(NODE_LINUX_CPU) {
Expand Down Expand Up @@ -1310,43 +1204,6 @@ def test_centos7_scala_cpu() {
}]
}

def test_windows_python2_cpu() {
return ['Python 2: CPU Win':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/ut-python-cpu') {
try {
utils.init_git_win()
unstash 'windows_package_cpu'
powershell 'ci/windows/test_py2_cpu.ps1'
} finally {
utils.collect_test_results_windows('nosetests_unittest.xml', 'nosetests_unittest_windows_python2_cpu.xml')
}
}
}
}
}]
}

def test_windows_python2_gpu() {
return ['Python 2: GPU Win':{
node(NODE_WINDOWS_GPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/ut-python-gpu') {
try {
utils.init_git_win()
unstash 'windows_package_gpu'
powershell 'ci/windows/test_py2_gpu.ps1'
} finally {
utils.collect_test_results_windows('nosetests_forward.xml', 'nosetests_gpu_forward_windows_python2_gpu.xml')
utils.collect_test_results_windows('nosetests_operator.xml', 'nosetests_gpu_operator_windows_python2_gpu.xml')
}
}
}
}
}]
}

def test_windows_python3_gpu() {
return ['Python 3: GPU Win':{
node(NODE_WINDOWS_GPU) {
Expand Down
2 changes: 0 additions & 2 deletions ci/jenkins/Jenkinsfile_unix_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ core_logic: {
])

utils.parallel_stage('Tests', [
custom_steps.test_unix_python2_cpu(),
custom_steps.test_unix_python3_cpu(),
custom_steps.test_unix_python3_debug_cpu(),
custom_steps.test_unix_python3_mkl_cpu(),
custom_steps.test_unix_python2_mkldnn_cpu(),
custom_steps.test_unix_python3_mkldnn_cpu(),
custom_steps.test_unix_python3_mkldnn_mkl_cpu(),
custom_steps.test_unix_scala_cpu(),
Expand Down
3 changes: 0 additions & 3 deletions ci/jenkins/Jenkinsfile_unix_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ core_logic: {
])

utils.parallel_stage('Tests', [
custom_steps.test_unix_python2_gpu(),
custom_steps.test_unix_python3_gpu(),
custom_steps.test_unix_python2_quantize_gpu(),
custom_steps.test_unix_python3_quantize_gpu(),
custom_steps.test_unix_python2_mkldnn_gpu(),
custom_steps.test_unix_python3_mkldnn_gpu(),
custom_steps.test_unix_python3_mkldnn_nocudnn_gpu(),
custom_steps.test_unix_python3_tensorrt_gpu(),
Expand Down
1 change: 0 additions & 1 deletion ci/jenkins/Jenkinsfile_windows_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ core_logic: {
])

utils.parallel_stage('Tests', [
custom_steps.test_windows_python2_cpu(),
custom_steps.test_windows_python3_cpu(),
custom_steps.test_windows_julia07_cpu(),
custom_steps.test_windows_julia10_cpu()
Expand Down
1 change: 0 additions & 1 deletion ci/jenkins/Jenkinsfile_windows_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ core_logic: {
])

utils.parallel_stage('Tests', [
custom_steps.test_windows_python2_gpu(),
custom_steps.test_windows_python3_gpu(),
custom_steps.test_windows_python3_gpu_mkldnn()
])
Expand Down

0 comments on commit 79d79d5

Please sign in to comment.