You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by la...@apache.org on 2020/04/10 17:12:52 UTC

[incubator-mxnet] branch v1.6.x updated: [R][v1.6.x] Fix blocked pipelines [windows, unix-cpu, unix-gpu] on v1.6.x (#17993)

This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch v1.6.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.6.x by this push:
     new 3ba1751  [R][v1.6.x] Fix blocked pipelines [windows,unix-cpu,unix-gpu] on v1.6.x (#17993)
3ba1751 is described below

commit 3ba1751188035b2c3198f3416130a515bc8c930d
Author: Chaitanya Prakash Bapat <ch...@gmail.com>
AuthorDate: Fri Apr 10 10:11:40 2020 -0700

    [R][v1.6.x] Fix blocked pipelines [windows,unix-cpu,unix-gpu] on v1.6.x (#17993)
    
    * fix R error; backport 1 line from #17228
    
    * print exception
    
    * remove namespace to resolve load_module not found error
    
    * fix static build ubuntu 1404 python error in nvidia docker gnutls handshake error
    
    * fix rvm version error
    
    * fix requantize flaky test (#16709)
    
    Co-authored-by: Xinyu Chen <xi...@intel.com>
---
 Makefile                                       | 1 -
 R-package/R/callback.R                         | 1 +
 R-package/R/zzz.R                              | 4 ++--
 ci/docker/Dockerfile.build.ubuntu_cpu_jekyll   | 4 ++--
 ci/docker/install/ubuntu_publish.sh            | 4 ++++
 tests/python/quantization/test_quantization.py | 2 +-
 6 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 4746cc4..2b65152 100644
--- a/Makefile
+++ b/Makefile
@@ -706,7 +706,6 @@ rpkg:
 	echo "import(Rcpp)" >> R-package/NAMESPACE
 	R CMD INSTALL R-package
 	Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package'); warnings()"
-	rm R-package/NAMESPACE
 	Rscript -e "devtools::document('R-package');warnings()"
 	R CMD INSTALL R-package
 
diff --git a/R-package/R/callback.R b/R-package/R/callback.R
index 014f926..04f31b7 100644
--- a/R-package/R/callback.R
+++ b/R-package/R/callback.R
@@ -16,6 +16,7 @@
 # under the License.
 
 #' @export mx.metric.logger
+library(methods)
 mx.metric.logger <- setRefClass("mx.metric.logger", fields = list(train = "numeric", eval="numeric"))
 
 #' Log training metric each period
diff --git a/R-package/R/zzz.R b/R-package/R/zzz.R
index a4f03ac..9d417bc 100644
--- a/R-package/R/zzz.R
+++ b/R-package/R/zzz.R
@@ -34,8 +34,8 @@ NULL
 .onLoad <- function(libname, pkgname) {
   # Require methods for older versions of R
   require(methods)
-  tryCatch(library.dynam("libmxnet", pkgname, libname, local=FALSE), error = function(e) { print('Loading local: inst/libs/libmxnet.so'); dyn.load("R-package/inst/libs/libmxnet.so", local=FALSE) })
-  tryCatch(library.dynam("mxnet", pkgname, libname), error = function(e) { print('Loading local: src/mxnet.so'); dyn.load("R-package/src/mxnet.so") })
+  tryCatch(library.dynam("libmxnet", pkgname, libname, local=FALSE), error = function(e) { print(e); print('Loading local: inst/libs/libmxnet.so'); dyn.load("R-package/inst/libs/libmxnet.so", local=FALSE) })
+  tryCatch(library.dynam("mxnet", pkgname, libname), error = function(e) { print(e); print('Loading local: src/mxnet.so'); dyn.load("R-package/src/mxnet.so") })
   loadModule("mxnet", TRUE)
   init.symbol.methods()
   init.context.default()
diff --git a/ci/docker/Dockerfile.build.ubuntu_cpu_jekyll b/ci/docker/Dockerfile.build.ubuntu_cpu_jekyll
index 62db71e..3dc845d 100644
--- a/ci/docker/Dockerfile.build.ubuntu_cpu_jekyll
+++ b/ci/docker/Dockerfile.build.ubuntu_cpu_jekyll
@@ -43,7 +43,7 @@ RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && \
 
 RUN source /etc/profile.d/rvm.sh && \
     rvm requirements && \
-    rvm install 2.6 && \
+    rvm install 2.6.3 && \
     rvm use 2.6.3 --default
 
 ENV BUNDLE_HOME=/work/deps/bundle
@@ -65,4 +65,4 @@ RUN chown -R jenkins_slave /work/ && \
     chown -R jenkins_slave /usr/local/bin && \
     chown -R jenkins_slave /usr/local/rvm
 
-WORKDIR /work/mxnet
\ No newline at end of file
+WORKDIR /work/mxnet
diff --git a/ci/docker/install/ubuntu_publish.sh b/ci/docker/install/ubuntu_publish.sh
index c3517e2..83c6197 100755
--- a/ci/docker/install/ubuntu_publish.sh
+++ b/ci/docker/install/ubuntu_publish.sh
@@ -20,6 +20,10 @@
 # Build on Ubuntu 14.04 LTS for LINUX CPU/GPU
 set -ex
 
+# replace https with http to force apt-get update to use http
+# nvidia-docker no longer supports ubuntu 14.04
+# refer https://github.com/apache/incubator-mxnet/issues/18005
+sudo sed -i 's/https/http/g' /etc/apt/sources.list.d/*.list
 apt-get update
 apt-get install -y software-properties-common
 add-apt-repository ppa:ubuntu-toolchain-r/test -y
diff --git a/tests/python/quantization/test_quantization.py b/tests/python/quantization/test_quantization.py
index 6d6ba41..723873a 100644
--- a/tests/python/quantization/test_quantization.py
+++ b/tests/python/quantization/test_quantization.py
@@ -178,7 +178,7 @@ def test_requantize_int32_to_int8():
                                                                           max_range.asscalar(),
                                                                           min_calib_range=min_calib_range,
                                                                           max_calib_range=max_calib_range)
-        assert_almost_equal(qdata_int8.asnumpy(), qdata_int8_np)
+        assert_almost_equal(qdata_int8.asnumpy(), qdata_int8_np, atol = 1)
         assert_almost_equal(min_output.asnumpy(), np.array([min_output_np]))
         assert_almost_equal(max_output.asnumpy(), np.array([max_output_np]))