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

[MXAPPS-581] Nightly Straight Dope tests. #11814

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

vishaalkapoor
Copy link
Contributor

Description

The Straight Dope notebooks will retrieved from the Github repo, run and
scanned for warnings and errors. Because we are not checking accuracy of
the training, we set the number of epochs to 1 to reduce the integration
test run time.

  • Common functionality for running and testing notebooks has been
    factored into a common test util module.
  • Support for running UTF-8 notebooks added (Python2 and 3 compatible).
  • Notebooks requiring a single GPU and multi GPUs have been split
    into two different test suites so that they can be run on different
    hardware.
  • Add test to make sure that all notebooks are tested.
  • Comment out broken notebooks while they are being fixed (I will
    uncomment them in a follow up PR).

set -ex
cd /work/mxnet/tests/nightly/straight_dope
rm -rf ./straight_dope_book
git clone https://github.com/zackchase/mxnet-the-straight-dope straight_dope_book
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to do this as part of the test class init? That way, the test would be self contained and doesn't need any bootstrapping.

@vishaalkapoor
Copy link
Contributor Author

@marcoabreu Thanks for the suggestion. I've moved the notebook download to the installation steps.

The Straight Dope notebooks will retrieved from the Github repo, run and
scanned for warnings and errors. Because we are not checking accuracy of
the training, we set the number of epochs to 1 to reduce the integration
test run time.
* Common functionality for running and testing notebooks has been
  factored into a common test util module.
* Support for running UTF-8 notebooks added (Python2 and 3 compatible).
* Notebooks requiring a single GPU and multi GPUs have been split
  into two different test suites so that they can be run on different
  hardware.
* Add test to make sure that all notebooks are tested.
* Comment out broken notebooks while they are being fixed (I will
  uncomment them in a follow up PR).
@@ -74,6 +74,10 @@ ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

# This needs to be run after /work/mxnet directory is created by ubuntu_adduser.sh.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean that this should be done in https://docs.python.org/2/library/unittest.html#unittest.TestCase.setUpClass

If you do it here, you have two problems:

  1. The directory won't be valid since the docker build is independent from the runtime
  2. The result will be cached and thus we might not be able to detect problems in the straight dope up front

I know that my suggestion is not ideal, but otherwise we got a test don't won't be runnable if executed without proper knowledge about dependencies.

@vishaalkapoor vishaalkapoor force-pushed the nightly-straight-dope branch 8 times, most recently from 4565b15 to 688767f Compare July 24, 2018 00:41
@vishaalkapoor
Copy link
Contributor Author

Hi @marcoabreu,
Thanks for the clarification.

I've updated the test harness to clone the repo and removed the old code. I rebased so the changes are in:
688767f

Please take a look. Thank you!

Vishaal

* Moving logic to download the Straight Dope notebooks to the test
harness.
* Remove cache logic as it is unnecessary.
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
(out, _) = proc.communicate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Is there a way we could add a timeout here? Git tends to not be very nice to us in terms of reliability..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commit to add a timeout.

Copy link
Contributor

@marcoabreu marcoabreu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM besides timeout for git clone

I added a test job at http://jenkins.mxnet-ci.amazon-ml.com/job/test-straight-dope-nightly/. Please review it carefully. If everything passes, we're good to go.

@vishaalkapoor
Copy link
Contributor Author

vishaalkapoor commented Jul 24, 2018

Thanks @marcoabreu , I added a timeout. Will keep tabs on the nightly test job you linked.

@marcoabreu
Copy link
Contributor

Do you think it would make sense to enable the log output? Right now, the output is pretty empty and you can't really tell which chapters have run so far.

@marcoabreu
Copy link
Contributor

marcoabreu commented Jul 24, 2018

CI passed at http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/test-straight-dope-nightly/detail/test-straight-dope-nightly/3/pipeline

We're good to ship for a first initial version. I think you will then follow up with other PRs to activate the remaining tests and address further issues.

Move two notebooks requiring multi-GPUs out of the single GPU test suite.
@vishaalkapoor
Copy link
Contributor Author

Thanks for your help @marcoabreu Agreed!

@indhub indhub merged commit 64d2e8b into apache:master Jul 24, 2018
@vishaalkapoor vishaalkapoor deleted the nightly-straight-dope branch July 24, 2018 20:24
XinYao1994 pushed a commit to XinYao1994/incubator-mxnet that referenced this pull request Aug 29, 2018
* [MXAPPS-581] Nightly Straight Dope tests.

The Straight Dope notebooks will retrieved from the Github repo, run and
scanned for warnings and errors. Because we are not checking accuracy of
the training, we set the number of epochs to 1 to reduce the integration
test run time.
* Common functionality for running and testing notebooks has been
  factored into a common test util module.
* Support for running UTF-8 notebooks added (Python2 and 3 compatible).
* Notebooks requiring a single GPU and multi GPUs have been split
  into two different test suites so that they can be run on different
  hardware.
* Add test to make sure that all notebooks are tested.
* Comment out broken notebooks while they are being fixed (I will
  uncomment them in a follow up PR).

* [MXAPPS-581] Download notebooks in test setup.

* Moving logic to download the Straight Dope notebooks to the test
harness.
* Remove cache logic as it is unnecessary.

* [MXAPPS-581] Add a timeout for download of notebooks.

* [MXAPPS-581] Move notebooks requiring multi-gpus.

Move two notebooks requiring multi-GPUs out of the single GPU test suite.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants