Skip to content

It is required to include LoDTensor input with batch_size=1 in sequence OP test (English Version)

Tao Luo edited this page Jan 15, 2020 · 1 revision

It is required to include batch size 1 LoDTensor input in sequence OP test


Sequence相关Op单测中必须包含batch size为1的LoDTensor输入


Specification summary::

  • Section 1, Background
  • Section 2, Details of The Specification
  • Section 3, Instructions of CI
  • Section 4, Suggestions Of Check Failure

Supplementary Note:

You may find some aspects that are not taken into account in the existing specifications, which need to be continuously supplemented and improved during the implementation process. Please feel free to give your feedback.

1. Background

For a one-dimensional LOD, the number of LODs can be understood as the value of batch size. Therefore, the unit test of sequence OPs must include the case of batch size = 1, otherwise, bugs may occur during actual operation.

2. Details of the Specification

Inspection Scope: In sequence OP's unit test, it is required to call Class OpTest's get_sequence_batch_size_1_input method at least once to get LoDTensor input with batch size = 1.

Special Cases

3. Instructions of CI

  • When the white list file check_op_sequence_batch_1_input_white_list.py is modified, CI incremental detection will be triggered, you need to describe the reason for skipping this check and ask for specific personnel to review

4. Suggestions For Check Failure

When the check fails, you can modify the unit test by referring to the following suggestions:

  • Check if the OP has a unit test file named "python/paddle/fluid/tests/unittests/sequence/test_${op_name}.py"
  • Check if the unit test has Class OpTest's get_sequence_batch_size_1_input function call at least once to get LoDTensor input with batch size 1.

If you encounter other problems, please contact @songyouwei

Clone this wiki locally