You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/22 00:58:19 UTC

[GitHub] indhub closed pull request #12165: [MXAPPS-581] Enable remaining tests in CI.

indhub closed pull request #12165: [MXAPPS-581] Enable remaining tests in CI.
URL: https://github.com/apache/incubator-mxnet/pull/12165
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/docker/install/ubuntu_nightly_tests.sh b/ci/docker/install/ubuntu_nightly_tests.sh
index 0e6b437a1d8..68358908bdc 100755
--- a/ci/docker/install/ubuntu_nightly_tests.sh
+++ b/ci/docker/install/ubuntu_nightly_tests.sh
@@ -32,6 +32,5 @@ apt-get -y install time
 apt-get install -y subversion maven -y #>/dev/null
 
 # Packages needed for the Straight Dope Nightly tests.
-pip2 install pandas
-pip3 install pandas
-
+pip2 install pandas scikit-image
+pip3 install pandas scikit-image
diff --git a/tests/nightly/straight_dope/straight_dope_test_utils.py b/tests/nightly/straight_dope/straight_dope_test_utils.py
index ee499a56fbd..976c234fa99 100644
--- a/tests/nightly/straight_dope/straight_dope_test_utils.py
+++ b/tests/nightly/straight_dope/straight_dope_test_utils.py
@@ -41,7 +41,7 @@
 GIT_REPO = 'https://github.com/zackchase/mxnet-the-straight-dope'
 KERNEL = os.getenv('MXNET_TEST_KERNEL', None)
 NOTEBOOKS_DIR = os.path.join(os.path.dirname(__file__), 'tmp_notebook')
-RELATIVE_DATA_PATH_REGEX = r'\.\.\/data\/'  # Regular expression to match the relative data path.
+RELATIVE_PATH_REGEX = r'\.\.(?=\/(data|img)\/)'  # Regular expression to match the relative data path.
 
 def _test_notebook(notebook, override_epochs=True):
     """Run Jupyter notebook to catch any execution error.
@@ -55,8 +55,9 @@ def _test_notebook(notebook, override_epochs=True):
     Returns:
         True if the notebook runs without warning or error.
     """
-    # Some notebooks will fail to run without error if we do not override the data path.
-    _override_data_path(notebook)
+    # Some notebooks will fail to run without error if we do not override
+    # relative paths to the data and image directories.
+    _override_relative_paths(notebook)
 
     if override_epochs:
         _override_epochs(notebook)
@@ -85,9 +86,10 @@ def _override_epochs(notebook):
         f.write(modified_notebook)
 
 
-def _override_data_path(notebook):
-    """Overrides the relative path for the data directory to point to the right place. This is
-    required as we run the notebooks in a different directory hierarchy more suitable for testing.
+def _override_relative_paths(notebook):
+    """Overrides the relative path for the data and image directories to point
+    to the right places. This is required as we run the notebooks in a different
+    directory hierarchy more suitable for testing.
 
     Args:
         notebook : string
@@ -100,7 +102,7 @@ def _override_data_path(notebook):
         notebook = f.read()
 
     # Update the location for the data directory.
-    modified_notebook = re.sub(RELATIVE_DATA_PATH_REGEX, NOTEBOOKS_DIR + '/data/', notebook)
+    modified_notebook = re.sub(RELATIVE_PATH_REGEX, NOTEBOOKS_DIR, notebook)
 
     # Replace the original notebook with the modified one.
     with io.open(notebook_path, 'w', encoding='utf-8') as f:
diff --git a/tests/nightly/straight_dope/test_notebooks_multi_gpu.py b/tests/nightly/straight_dope/test_notebooks_multi_gpu.py
index ef07550bdf7..c5dffa455ce 100644
--- a/tests/nightly/straight_dope/test_notebooks_multi_gpu.py
+++ b/tests/nightly/straight_dope/test_notebooks_multi_gpu.py
@@ -33,19 +33,16 @@ def setUpClass(self):
 
     # Chapter 7
 
-    # TODO(vishaalk): module 'mxnet.gluon' has no attribute 'autograd'
-    #def test_multiple_gpus_scratch(self):
-    #    assert _test_notebook('chapter07_distributed-learning/multiple-gpus-scratch')
+    def test_multiple_gpus_scratch(self):
+        assert _test_notebook('chapter07_distributed-learning/multiple-gpus-scratch')
 
     def test_multiple_gpus_gluon(self):
         assert _test_notebook('chapter07_distributed-learning/multiple-gpus-gluon')
 
-    # TODO(vishaalk): Do a dry run, and then enable.
-    #def test_training_with_multiple_machines(self):
-    #    assert _test_notebook('chapter07_distributed-learning/training-with-multiple-machines')
+    def test_training_with_multiple_machines(self):
+       assert _test_notebook('chapter07_distributed-learning/training-with-multiple-machines')
 
     # Chapter 8
 
-    # TODO(vishaalk): Module skimage needs to be added to docker image.
-    # def test_fine_tuning(self):
-    #    assert _test_notebook('chapter08_computer-vision/fine-tuning')
+    def test_fine_tuning(self):
+       assert _test_notebook('chapter08_computer-vision/fine-tuning')
diff --git a/tests/nightly/straight_dope/test_notebooks_single_gpu.py b/tests/nightly/straight_dope/test_notebooks_single_gpu.py
index fca49f43ade..a60498c8786 100644
--- a/tests/nightly/straight_dope/test_notebooks_single_gpu.py
+++ b/tests/nightly/straight_dope/test_notebooks_single_gpu.py
@@ -34,9 +34,13 @@
     'chapter01_crashcourse/chapter-one-problem-set',
     'chapter02_supervised-learning/environment',
     'chapter03_deep-neural-networks/kaggle-gluon-kfold',
+    'chapter04_convolutional-neural-networks/deep-cnns-alexnet',  # > 10 mins.
+    'chapter06_optimization/gd-sgd-scratch',  # Overflow warning is intended.
+    'chapter06_optimization/gd-sgd-gluon',  # Overflow warning is intended.
     'chapter07_distributed-learning/multiple-gpus-scratch',
     'chapter07_distributed-learning/multiple-gpus-gluon',
     'chapter07_distributed-learning/training-with-multiple-machines',
+    'chapter11_recommender-systems/intro-recommender-systems',  # Early draft, non-working.
     'chapter12_time-series/intro-forecasting-gluon',
     'chapter12_time-series/intro-forecasting-2-gluon',
     'chapter13_unsupervised-learning/vae-gluon',
@@ -45,6 +49,8 @@
     'chapter17_deep-reinforcement-learning/DDQN',
     'chapter19_graph-neural-networks/Graph-Neural-Networks',
     'chapter16_tensor_methods/tensor_basics',
+    'chapter18_variational-methods-and-uncertainty/bayes-by-backprop',  # > 10 mins.
+    'chapter18_variational-methods-and-uncertainty/bayes-by-backprop-gluon',  # > 10 mins.
     'cheatsheets/kaggle-gluon-kfold'
 ]
 
@@ -139,9 +145,8 @@ def test_plumbing(self):
     def test_custom_layer(self):
         assert _test_notebook('chapter03_deep-neural-networks/custom-layer')
 
-    # TODO(vishaalk): Load params and Save params are deprecated warning.
-    #def test_serialization(self):
-    #    assert _test_notebook('chapter03_deep-neural-networks/serialization')
+    def test_serialization(self):
+        assert _test_notebook('chapter03_deep-neural-networks/serialization')
 
     # Chapter 4
 
@@ -151,10 +156,6 @@ def test_cnn_scratch(self):
     def test_cnn_gluon(self):
         assert _test_notebook('chapter04_convolutional-neural-networks/cnn-gluon')
 
-    # TODO(vishaalk): Load params and Save params are deprecated warning.
-    #def test_deep_cnns_alexnet(self):
-    #    assert _test_notebook('chapter04_convolutional-neural-networks/deep-cnns-alexnet')
-
     def test_very_deep_nets_vgg(self):
         assert _test_notebook('chapter04_convolutional-neural-networks/very-deep-nets-vgg')
 
@@ -175,22 +176,14 @@ def test_lstm_scratch(self):
     def test_gru_scratch(self):
         assert _test_notebook('chapter05_recurrent-neural-networks/gru-scratch')
 
-    #def test_rnns_gluon(self):
-    #    assert _test_notebook('chapter05_recurrent-neural-networks/rnns-gluon')
+    def test_rnns_gluon(self):
+        assert _test_notebook('chapter05_recurrent-neural-networks/rnns-gluon')
 
     # Chapter 6
 
     def test_optimization_intro(self):
         assert _test_notebook('chapter06_optimization/optimization-intro')
 
-    # TODO(vishaalk): RuntimeWarning: Overflow encountered in reduce.
-    #def test_gd_sgd_scratch(self):
-    #    assert _test_notebook('chapter06_optimization/gd-sgd-scratch')
-
-    # TODO(vishaalk): RuntimeWarning: Overflow encountered in reduce.
-    #def test_gd_sgd_gluon(self):
-    #    assert _test_notebook('chapter06_optimization/gd-sgd-gluon')
-
     def test_momentum_scratch(self):
         assert _test_notebook('chapter06_optimization/momentum-scratch')
 
@@ -229,29 +222,20 @@ def test_hybridize(self):
 
     # Chapter 8
 
-    # TODO(vishaalk): Load params and Save params are deprecated warning.
-    #def test_object_detection(self):
-    #    assert _test_notebook('chapter08_computer-vision/object-detection')
+    def test_object_detection(self):
+        assert _test_notebook('chapter08_computer-vision/object-detection')
 
-    # TODO(vishaalk): Module skimage needs to be added to docker image.
-    #def test_fine_tuning(self):
-    #    assert _test_notebook('chapter08_computer-vision/fine-tuning')
+    def test_fine_tuning(self):
+        assert _test_notebook('chapter08_computer-vision/fine-tuning')
 
-    # TODO(vishaalk):
-    #def test_visual_question_answer(self):
-    #    assert _test_notebook('chapter08_computer-vision/visual-question-answer')
+    def test_visual_question_answer(self):
+        assert _test_notebook('chapter08_computer-vision/visual-question-answer')
 
     # Chapter 9
 
     def test_tree_lstm(self):
         assert _test_notebook('chapter09_natural-language-processing/tree-lstm')
 
-    # Chapter 11
-
-    # TODO(vishaalk): Deferred initialization failed because shape cannot be inferred.
-    #def test_intro_recommender_systems(self):
-    #    assert _test_notebook('chapter11_recommender-systems/intro-recommender-systems')
-
     # Chapter 12
 
     def test_lds_scratch(self):
@@ -271,14 +255,5 @@ def test_dcgan(self):
     def test_generative_adversarial_networks(self):
         assert _test_notebook('chapter14_generative-adversarial-networks/conditional')
 
-    # TODO(vishaalk): Investigate.
-    #def test_pixel2pixel(self):
-    #    assert _test_notebook('chapter14_generative-adversarial-networks/pixel2pixel')
-
-    # Chapter 18
-
-    #def test_bayes_by_backprop(self):
-    #    assert _test_notebook('chapter18_variational-methods-and-uncertainty/bayes-by-backprop')
-
-    #def test_bayes_by_backprop_gluon(self):
-    #    assert _test_notebook('chapter18_variational-methods-and-uncertainty/bayes-by-backprop-gluon')
+    def test_pixel2pixel(self):
+        assert _test_notebook('chapter14_generative-adversarial-networks/pixel2pixel')


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services