caffe2 - support flaky operator tests for caffe2 build (#18155)
authorDuc Ngo <duc@fb.com>
Mon, 25 Mar 2019 23:55:30 +0000 (16:55 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 25 Mar 2019 23:58:34 +0000 (16:58 -0700)
commit6a1a019c0ad63182ea10afa2e9fc52d38ec5eebc
tree6d21e46b706847831da7d677ffca3bbcdca1cf0f
parent7a90bae416aba899fa1d3a5239fced428cf9f2e9
caffe2 - support flaky operator tests for caffe2 build (#18155)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18155

- Make a python decorator caffe2_flaky for caffe2 operator unit tests.
- The environment variable CAFFE2_RUN_FLAKY_TESTS are now used to mark flaky test mode

During test run,
- If flaky tests mode are on, only flaky tests are run
- If flaky tests mode are off, only non-flaky tests are run

Mark ctc_beam_search_decoder_op_test as flaky

Reviewed By: ezyang, salexspb

Differential Revision: D14468816

fbshipit-source-id: dceb4a48daeb5437ad9cc714bef3343e9761f3a4
caffe2/python/operator_test/ctc_beam_search_decoder_op_test.py
caffe2/python/test_util.py