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

Conversation

@leezu
Copy link
Contributor

@leezu leezu commented Sep 29, 2020

faccd91 introduced a automatic pytest hooks for handling MXNET_MODULE_SEED adapted from https://github.com/dmlc/gluon-nlp/blob/917855b/conftest.py but didn't yet remove the existing seed handling via explicit setup and teardown functions.

This commit removes the explicit setup and teardown functions in favor of the
automatic pytest version, and thereby also ensures that the seed handling code
is not executed twice. As a side benefit, seed handling now works correctly even
if contributors forget to add the magic setup_module and teardown_module
imports in new test files.

If pytest is run with --capture=no (or -s shorthand), output of the module level
fixtures is shown to the user.

@leezu leezu requested a review from szha September 29, 2020 22:56
@mxnet-bot
Copy link

Hey @leezu , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [sanity, centos-cpu, edge, website, miscellaneous, windows-cpu, centos-gpu, windows-gpu, clang, unix-gpu, unix-cpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@leezu leezu force-pushed the 2020-09/fix-pytest-setup-teardown branch from ee72402 to 641f12b Compare October 8, 2020 22:35
faccd91 introduced a automatic pytest hooks for
handling MXNET_MODULE_SEED adapted from
dmlc/gluon-nlp@66e926a
but didn't remove the existing seed handling via explicit setup and teardown
functions.

This commit removes the explicit setup and teardown functions in favor of the
automatic pytest version, and thereby also ensures that the seed handling code
is not executed twice. As a side benefit, seed handling now works correctly even
if contributors forget to add the magic setup_module and teardown_module
imports in new test files.

If pytest is run with --capture=no (or -s shorthand), output of the module level
fixtures is shown to the user.
@leezu leezu force-pushed the 2020-09/fix-pytest-setup-teardown branch 2 times, most recently from b5c96be to 987e227 Compare October 9, 2020 18:38
@leezu leezu force-pushed the 2020-09/fix-pytest-setup-teardown branch from 987e227 to e2b65fb Compare October 9, 2020 20:26
@leezu leezu added the pr-awaiting-review PR is waiting for code review label Oct 9, 2020
@leezu
Copy link
Contributor Author

leezu commented Oct 10, 2020

@mxnet-bot run ci [miscellaneous]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [miscellaneous]

@leezu
Copy link
Contributor Author

leezu commented Oct 10, 2020

@mxnet-bot run ci [miscellaneous]

[2020-10-10T00:53:29.773Z] [960/977] Building CXX object 3rdparty/mkldnn/src/cpu/CMakeFiles/dnnl_cpu.dir/cpu_reorder.cpp.o

[2020-10-10T00:53:50.333Z] Cannot contact mxnetlinux-cpu_cqe3ns49vo: java.lang.InterruptedException

[2020-10-10T01:10:43.825Z] wrapper script does not seem to be touching the log file in /home/jenkins_slave/workspace/build-cpu-clang10@tmp/durable-11bd7127

[2020-10-10T01:10:43.825Z] (JENKINS-48300: if on an extremely laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=86400)

script returned exit code -1

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [miscellaneous]

@szha szha merged commit 480d027 into apache:master Oct 11, 2020
@leezu leezu deleted the 2020-09/fix-pytest-setup-teardown branch October 11, 2020 22:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-awaiting-review PR is waiting for code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants