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

Commit

Permalink
remove dependency on train_mnist.py script (#18550)
Browse files Browse the repository at this point in the history
* remove dependency on train_mnist.py script

* remove image classification tests from nightly
  • Loading branch information
mseth10 authored Jun 14, 2020
1 parent 09cf48a commit da25273
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 127 deletions.
9 changes: 2 additions & 7 deletions cd/python/docker/test_python_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,9 @@ if [ -z "${MXNET_COMMIT_ID}" ]; then
fi

# Execute tests
if [[ $mxnet_variant == cu* ]]; then
mnist_params="--gpu 0"
test_conv_params="--gpu"
fi

if [[ $mxnet_variant == cpu ]]; then
if [[ $mxnet_variant != native ]]; then
python3 tests/python/mkl/test_mkldnn.py
fi

python3 example/image-classification/train_mnist.py ${mnist_params}
# TODO: Add more tests (18549)

19 changes: 1 addition & 18 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1403,13 +1403,6 @@ nightly_test_imagenet_inference() {
./unit_test_imagenet_inference.sh
}

#Runs a simple MNIST training example
nightly_test_image_classification() {
set -ex
export DMLC_LOG_STACK_TRACE_DEPTH=10
./tests/nightly/test_image_classification.sh
}

#Single Node KVStore Test
nightly_test_KVStore_singleNode() {
set -ex
Expand Down Expand Up @@ -1894,21 +1887,11 @@ cd_integration_test_pypi() {
set -ex
source /opt/rh/rh-python36/enable

local gpu_enabled=${1:-"false"}

local test_conv_params=''
local mnist_params=''

if [ "${gpu_enabled}" = "true" ]; then
mnist_params="--gpu 0"
test_conv_params="--gpu"
fi

# install mxnet wheel package
pip3 install --user ./wheel_build/dist/*.whl

# execute tests
python3 /work/mxnet/example/image-classification/train_mnist.py ${mnist_params}
# TODO: Add tests (18549)
}

# Publishes wheel to PyPI
Expand Down
1 change: 0 additions & 1 deletion docker/docker-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ For example:
`./build_python_dockerfile.sh 1.3.0 1.3.0.post0 ~/build-docker/incubator-mxnet`

### Tests run
* [train_mnist.py](https://github.com/apache/incubator-mxnet/blob/master/example/image-classification/train_mnist.py)
* [test_mxnet.py](https://github.com/apache/incubator-mxnet/blob/master/docker/docker-python/test_mxnet.py): This script is used to make sure that the docker image builds the expected mxnet version. That is, the version picked by pip is the same as as the version passed as a parameter.

### Dockerhub Credentials
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-python/build_python_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ docker_test_image_cpu(){
python_version="${2}"
echo "Running tests on mxnet/python:${image_tag}"
docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/docker/docker-python/test_mxnet.py ${mxnet_version}"
docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/example/image-classification/train_mnist.py"
}

docker_test_image_gpu(){
image_tag="${1}"
python_version="${2}"
echo "Running tests on mxnet/python:${1}"
nvidia-docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/docker/docker-python/test_mxnet.py ${mxnet_version}"
nvidia-docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/example/image-classification/train_mnist.py --gpus 0,1,2,3"
}

# if both $MXNET_DOCKERHUB_PASSWORD and $MXNET_DOCKERHUB_USERNAME environment variables are set, docker will automatically login
Expand Down
10 changes: 1 addition & 9 deletions tests/nightly/JenkinsfileForBinaries
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ core_logic: {
}

stage('NightlyTests'){
parallel 'ImageClassification: GPU': {
node(NODE_LINUX_GPU) {
ws('workspace/nt-ImageClassificationTest') {
utils.unpack_and_init('gpu', mx_lib)
utils.docker_run('ubuntu_build_cuda', 'nightly_test_image_classification', true)
}
}
},
'ImageNet Inference: GPU': {
parallel 'ImageNet Inference: GPU': {
node(NODE_LINUX_GPU) {
ws('workspace/nt-ImageInferenceTest') {
utils.unpack_and_init('gpu', mx_lib)
Expand Down
67 changes: 0 additions & 67 deletions tests/nightly/test_image_classification.sh

This file was deleted.

23 changes: 0 additions & 23 deletions tools/profile/tune_mnist.sh

This file was deleted.

0 comments on commit da25273

Please sign in to comment.