Skip to content

Commit

Permalink
Merge tag '1.4.1' into master_1.4.1
Browse files Browse the repository at this point in the history
1.4.1
  • Loading branch information
Jopyth committed May 22, 2019
2 parents 683fb59 + 1a71996 commit 02c0db4
Show file tree
Hide file tree
Showing 114 changed files with 1,029 additions and 500 deletions.
32 changes: 13 additions & 19 deletions Jenkinsfile
Expand Up @@ -390,40 +390,34 @@ core_logic: {
},
'Build CPU windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-cpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_CPU'
stash includes: 'windows_package.7z', name: 'windows_package_cpu'
}
ws('workspace/build-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'py -3 ci/build_windows.py -f WIN_CPU'
stash includes: 'windows_package.7z', name: 'windows_package_cpu'
}
}
}
},

'Build GPU windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
ws('workspace/build-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU'
powershell 'py -3 ci/build_windows.py -f WIN_GPU'
stash includes: 'windows_package.7z', name: 'windows_package_gpu'
}
}
}
}
},
'Build GPU MKLDNN windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0','BUILD_NAME=vc14_gpu_mkldnn']) {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU_MKLDNN'
stash includes: 'windows_package.7z', name: 'windows_package_gpu_mkldnn'
}
ws('workspace/build-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'py -3 ci/build_windows.py -f WIN_GPU_MKLDNN'
stash includes: 'windows_package.7z', name: 'windows_package_gpu_mkldnn'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion R-package/DESCRIPTION
@@ -1,7 +1,7 @@
Package: mxnet
Type: Package
Title: MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systems
Version: 1.4.0
Version: 1.4.1
Date: 2017-06-27
Author: Tianqi Chen, Qiang Kou, Tong He
Maintainer: Qiang Kou <qkou@qkou.info>
Expand Down
11 changes: 7 additions & 4 deletions R-package/tests/testthat/get_data.R
Expand Up @@ -55,13 +55,16 @@ GetInception <- function() {
if (!dir.exists("model")) {
dir.create("model/")
}

if (!file.exists("model/Inception-BN-0126.params")) {
download.file("http://data.dmlc.ml/models/imagenet/inception-bn/Inception-BN-0126.params",
destfile = "model/Inception-BN-0126.params")
download.file(
"http://data.mxnet.io/mxnet/models/imagenet/inception-bn/Inception-BN-0126.params?raw=true",
destfile = "model/Inception-BN-0126.params")
}
if (!file.exists("model/Inception-BN-symbol.json")) {
download.file("http://data.dmlc.ml/models/imagenet/inception-bn/Inception-BN-symbol.json",
destfile = "model/Inception-BN-symbol.json")
download.file(
"http://data.mxnet.io/mxnet/models/imagenet/inception-bn/Inception-BN-symbol.json",
destfile = "model/Inception-BN-symbol.json")
}
}

Expand Down
4 changes: 2 additions & 2 deletions R-package/vignettes/CatsDogsFinetune.Rmd
Expand Up @@ -162,13 +162,13 @@ val <- data$val

## Load pretrained model

Here we use the pretrained model from http://data.dmlc.ml/models/imagenet/.
Here we use the pretrained model from http://data.mxnet.io/mxnet/data/.
There are 1000 classes in imagenet,
and we need to replace the last fully connected layer with a new layer for 2 classes.


```{r}
download.file('http://data.dmlc.ml/data/Inception.zip', destfile = 'Inception.zip')
download.file('http://data.mxnet.io/mxnet/data/Inception.zip', destfile = 'Inception.zip')
unzip("Inception.zip")
inception_bn <- mx.model.load("./Inception-BN", iteration = 126)
Expand Down
Expand Up @@ -31,7 +31,7 @@ Make sure you unzip the pre-trained model in current folder. And we can use the
loading function to load the model into R.

```{r}
download.file('http://data.dmlc.ml/data/Inception.zip', destfile = 'Inception.zip')
download.file('http://data.mxnet.io/mxnet/data/Inception.zip', destfile = 'Inception.zip')
unzip("Inception.zip")
model <- mx.model.load("Inception/Inception_BN", iteration = 39)
```
Expand Down
6 changes: 3 additions & 3 deletions ci/build_windows.py
Expand Up @@ -216,11 +216,11 @@ def main():
if system == 'Windows':
logging.info("Detected Windows platform")
if 'OpenBLAS_HOME' not in os.environ:
os.environ["OpenBLAS_HOME"] = "C:\\mxnet\\openblas"
os.environ["OpenBLAS_HOME"] = "C:\\Program Files\\OpenBLAS-v0.2.19"
if 'OpenCV_DIR' not in os.environ:
os.environ["OpenCV_DIR"] = "C:\\mxnet\\opencv_vc14"
os.environ["OpenCV_DIR"] = "C:\\Program Files\\OpenCV-v3.4.1\\build"
if 'CUDA_PATH' not in os.environ:
os.environ["CUDA_PATH"] = "C:\\CUDA\\v8.0"
os.environ["CUDA_PATH"] = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2"
windows_build(args)

elif system == 'Linux' or system == 'Darwin':
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/qemu/runtime_functions.py
Expand Up @@ -77,8 +77,8 @@ def run_ut_python3_qemu_internal():
logging.info("=== NOW Running inside QEMU ===")
logging.info("PIP Installing %s", pkg)
check_call(['sudo', 'pip3', 'install', pkg])
logging.info("PIP Installing mxnet/tests/requirements.txt")
check_call(['sudo', 'pip3', 'install', '-r', 'mxnet/tests/requirements.txt'])
logging.info("PIP Installing mxnet/test_requirements.txt")
check_call(['sudo', 'pip3', 'install', '-r', 'mxnet/test_requirements.txt'])
logging.info("Running tests in mxnet/tests/python/unittest/")
check_call(['nosetests', '--with-timer', '--with-xunit', '--xunit-file', 'nosetests_unittest.xml', '--verbose', 'mxnet/tests/python/unittest/test_engine.py'])
# Example to run a single unit test:
Expand Down
1 change: 1 addition & 0 deletions ci/docker/qemu/vmcontrol.py
Expand Up @@ -187,6 +187,7 @@ def qemu_provision(ssh_port=QEMU_SSH_PORT):
qemu_rsync(ssh_port, '/work/runtime_functions.py','')
qemu_rsync(ssh_port, '/work/vmcontrol.py','')
qemu_rsync(ssh_port, 'mxnet/tests', 'mxnet')
qemu_rsync(ssh_port, 'mxnet/ci/qemu/test_requirements.txt', 'mxnet/test_requirements.txt')
logging.info("Provisioning completed successfully.")


Expand Down
32 changes: 13 additions & 19 deletions ci/jenkins/Jenkins_steps.groovy
Expand Up @@ -450,13 +450,11 @@ def compile_unix_amalgamation() {
def compile_windows_cpu() {
return ['Build CPU windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-cpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_CPU'
stash includes: 'windows_package.7z', name: 'windows_package_cpu'
}
ws('workspace/build-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'py -3 ci/build_windows.py -f WIN_CPU'
stash includes: 'windows_package.7z', name: 'windows_package_cpu'
}
}
}
Expand All @@ -466,13 +464,11 @@ def compile_windows_cpu() {
def compile_windows_gpu() {
return ['Build GPU windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0']) {
ws('workspace/build-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU'
powershell 'py -3 ci/build_windows.py -f WIN_GPU'
stash includes: 'windows_package.7z', name: 'windows_package_gpu'
}
}
}
}
Expand All @@ -482,13 +478,11 @@ def compile_windows_gpu() {
def compile_windows_gpu_mkldnn() {
return ['Build GPU MKLDNN windows':{
node(NODE_WINDOWS_CPU) {
timeout(time: max_time, unit: 'MINUTES') {
ws('workspace/build-gpu') {
withEnv(['OpenBLAS_HOME=C:\\mxnet\\openblas', 'OpenCV_DIR=C:\\mxnet\\opencv_vc14', 'CUDA_PATH=C:\\CUDA\\v8.0','BUILD_NAME=vc14_gpu_mkldnn']) {
utils.init_git_win()
powershell 'python ci/build_windows.py -f WIN_GPU_MKLDNN'
stash includes: 'windows_package.7z', name: 'windows_package_gpu_mkldnn'
}
ws('workspace/build-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git_win()
powershell 'py -3 ci/build_windows.py -f WIN_GPU_MKLDNN'
stash includes: 'windows_package.7z', name: 'windows_package_gpu_mkldnn'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ci/jenkins/Jenkinsfile_windows_cpu
Expand Up @@ -35,12 +35,12 @@ utils.main_wrapper(
core_logic: {
utils.parallel_stage('Build', [
custom_steps.compile_windows_cpu()
])
])

utils.parallel_stage('Tests', [
custom_steps.test_windows_python2_cpu(),
custom_steps.test_windows_python3_cpu()
])
])
}
,
failure_handler: {
Expand Down
4 changes: 4 additions & 0 deletions ci/qemu/README.md
Expand Up @@ -86,3 +86,7 @@ pip3 install -r mxnet_requirements.txt


To access qemu control console from tmux: `ctrl-a a c`

# CI and Testing

Formally, [runtime_functions.py](https://github.com/apache/incubator-mxnet/blob/master/ci/docker/qemu/runtime_functions.py) would [run](https://github.com/apache/incubator-mxnet/blob/8beea18e3d9835f90b59d3f9de8f9945ac819423/ci/docker/qemu/runtime_functions.py#L81) *pip install -r [mxnet/tests/requirements.txt](https://github.com/apache/incubator-mxnet/blob/master/tests/requirements.txt)*. If the requirements change, there can be an unfortunate side-effect that there are no wheel files for Raspberry Pi for the new requirement. This would trigger a build from source on the emulator, which can take a long time and cause job timeouts. Therefore, we no longer install the `tests/requirements.txt` requirements, but rather rely on [test_requirements.txt](https://github.com/apache/incubator-mxnet/blob/master/ci/qemu/test_requirements.txt) to maintain the requirements for the qemu tests. Should any requirements changes lead to a job time out, it is incumbent on the submitter to update the image to include the requirement and unblock ci.
3 changes: 3 additions & 0 deletions ci/qemu/test_requirements.txt
@@ -0,0 +1,3 @@
mock
nose
nose-timer
8 changes: 5 additions & 3 deletions ci/windows/test_py2_cpu.ps1
Expand Up @@ -19,8 +19,10 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py2\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python27\Scripts\pip install -r tests\requirements.txt
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running train tests") }
12 changes: 7 additions & 5 deletions ci/windows/test_py2_gpu.ps1
Expand Up @@ -19,12 +19,14 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py2\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python27\Scripts\pip install -r tests\requirements.txt
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py2\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error tests\python\train
C:\Python27\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error tests\python\train
if (! $?) { Throw ("Error running tests") }
8 changes: 5 additions & 3 deletions ci/windows/test_py3_cpu.ps1
Expand Up @@ -19,8 +19,10 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py3\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python37\Scripts\pip install -r tests\requirements.txt
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running train tests") }
12 changes: 7 additions & 5 deletions ci/windows/test_py3_gpu.ps1
Expand Up @@ -19,12 +19,14 @@
$env:MXNET_LIBRARY_PATH=join-path $pwd.Path windows_package\lib\libmxnet.dll
$env:PYTHONPATH=join-path $pwd.Path windows_package\python
$env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0
c:\Anaconda3\envs\py3\Scripts\pip install -r tests\requirements.txt
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
$env:MXNET_HOME=[io.path]::combine($PSScriptRoot, 'mxnet_home')

C:\Python37\Scripts\pip install -r tests\requirements.txt
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_unittest.xml tests\python\unittest
if (! $?) { Throw ("Error running unittest") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_operator.xml tests\python\gpu\test_operator_gpu.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_forward.xml tests\python\gpu\test_forward.py
if (! $?) { Throw ("Error running tests") }
c:\Anaconda3\envs\py3\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
C:\Python37\python.exe -m nose -v --with-timer --timer-ok 1 --timer-warning 15 --timer-filter warning,error --with-xunit --xunit-file nosetests_train.xml tests\python\train
if (! $?) { Throw ("Error running tests") }

0 comments on commit 02c0db4

Please sign in to comment.