Skip to content

Commit c85fc97

Browse files
authored
Update check_approval.sh (#76012)
* Update check_approval.sh * Update check_approval.sh
1 parent 246c4a9 commit c85fc97

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

ci/check_approval.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function run_tools_test() {
5555

5656
changed_env_var_count=`git diff -U0 upstream/$BRANCH ${PADDLE_ROOT}/paddle | grep 'DEFINE_EXPORTED' | grep -v '@@' | wc -l`
5757
if [[ $changed_env_var_count -gt 0 ]]; then
58-
echo_line="You must have one RD (phlrain or luotao1) approval for changing the FLAGS, which manages the environment variables.\n"
59-
check_approval 1 phlrain luotao1
58+
echo_line="You must have one RD (phlrain) approval for changing the FLAGS, which manages the environment variables.\n"
59+
check_approval 1 phlrain
6060
fi
6161

6262
changed_deprecated_tests_count=$(expr $(git ls-tree -r --name-only HEAD ${PADDLE_ROOT}/test/deprecated | grep '^test' | wc -l) - $(git ls-tree -r --name-only upstream/$BRANCH ${PADDLE_ROOT}/test/deprecated | grep '^tes' | wc -l))
@@ -116,8 +116,8 @@ fi
116116

117117
HAS_PADDLE_GET=`git diff -U0 upstream/$BRANCH $FILTER |grep "^+" |grep -o -m 1 "paddle::get" || true`
118118
if [ ${HAS_PADDLE_GET} ] && [ "${PR_ID}" != "" ]; then
119-
echo_line="paddle::get is not recommended for direct use, because it may throw an bad_variant_access exception without any stack information, so please use PADDLE_GET(_**)(dtype, value) series macros here. If these macros cannot meet your needs, please use try-catch to handle paddle::get and request luotao1 or zhangbo9674 or phlrain review and approve.\n"
120-
check_approval 1 luotao1 zhangbo9674 phlrain
119+
echo_line="paddle::get is not recommended for direct use, because it may throw an bad_variant_access exception without any stack information, so please use PADDLE_GET(_**)(dtype, value) series macros here. If these macros cannot meet your needs, please use try-catch to handle paddle::get and request zhangbo9674 or phlrain review and approve.\n"
120+
check_approval 1 zhangbo9674 phlrain
121121
fi
122122

123123
HAS_LEGACY_KERNEL_REGISTRATION=`git diff -U0 upstream/$BRANCH $FILTER | grep '^\+' | grep -oE -m 1 "REGISTER_OP[A-Z_]{1,9}KERNEL[_FUNCTOR|_WITH_CUSTOM_TYPE|_EX]*" || true`
@@ -170,8 +170,8 @@ fi
170170
NO_NPU_FILE=`git diff --name-only upstream/$BRANCH | grep -v "_npu.py"`
171171
HAS_UNITTEST_SKIP=`git diff -U0 upstream/$BRANCH ${NO_NPU_FILE} | grep "^+[[:space:]]\{0,\}@unittest.skip" || true`
172172
if [ "${HAS_UNITTEST_SKIP}" != "" ] && [ "${PR_ID}" != "" ]; then
173-
echo_line="Unittest is not allowed to be disabled.\nYou must have one RD (kolinwei(Recommend), wanghuancoder, luotao1, QingshuChen) approval for the usage of @unittest.skip or @unittest.skipIf.\n${HAS_UNITTEST_SKIP}\n"
174-
check_approval 1 kolinwei wanghuancoder luotao1 QingshuChen
173+
echo_line="Unittest is not allowed to be disabled.\nYou must have one RD (kolinwei(Recommend), wanghuancoder, QingshuChen) approval for the usage of @unittest.skip or @unittest.skipIf.\n${HAS_UNITTEST_SKIP}\n"
174+
check_approval 1 kolinwei wanghuancoder QingshuChen
175175
fi
176176

177177
HAS_MODIFIED_DEMO_CMAKE=`git diff --name-only upstream/$BRANCH | grep "paddle/fluid/inference/api/demo_ci/CMakeLists.txt" || true`
@@ -332,8 +332,8 @@ fi
332332

333333
INVALID_UNITTEST_ASSERT_CHECK=`echo "$ALL_ADDED_LINES" | grep -zoE '\+\s+((assert\s+)|(self\.assert(True|Equal)\())(\s*\+\s*)?(np|numpy)\.(allclose|array_equal)[^+]*' || true`
334334
if [ "${INVALID_UNITTEST_ASSERT_CHECK}" != "" ] && [ "${PR_ID}" != "" ]; then
335-
echo_line="It is recommended to use 'np.testing.assert_allclose' and 'np.testing.assert_array_equal' instead of 'self.assertTrue(np.allclose(...))' and 'self.assertTrue(np.array_equal(...))'.\nPlease modify the code below. If anything is unclear, please read the specification [ https://github.com/PaddlePaddle/community/blob/master/rfcs/CodeStyle/20220805_code_style_improvement_for_unittest.md#background ]. If it is a mismatch, please request SigureMo (Recommend) or zrr1999 or luotao1 review and approve.\nThe code that do not meet the specification are as follows:\n${INVALID_UNITTEST_ASSERT_CHECK}\n"
336-
check_approval 1 SigureMo zrr1999 luotao1
335+
echo_line="It is recommended to use 'np.testing.assert_allclose' and 'np.testing.assert_array_equal' instead of 'self.assertTrue(np.allclose(...))' and 'self.assertTrue(np.array_equal(...))'.\nPlease modify the code below. If anything is unclear, please read the specification [ https://github.com/PaddlePaddle/community/blob/master/rfcs/CodeStyle/20220805_code_style_improvement_for_unittest.md#background ]. If it is a mismatch, please request SigureMo (Recommend) or zrr1999 review and approve.\nThe code that do not meet the specification are as follows:\n${INVALID_UNITTEST_ASSERT_CHECK}\n"
336+
check_approval 1 SigureMo zrr1999
337337
fi
338338

339339
TEST_FILE_ADDED_LINES=$(git diff -U0 upstream/$BRANCH -- test |grep "^+")
@@ -459,21 +459,21 @@ if [ "${NEW_OP_ADDED}" != "" ] && [ "${PR_ID}" != "" ]; then
459459
GET_KERNEL_TYPE_FUNC_CNT=`git diff -U0 --diff-filter=A upstream/$BRANCH |grep "+" |grep -czoE "GetExpectedKernelType[(][^(){}]+[)][^{]+[{][^}]+[}]" || true`
460460
INDICATE_VAR_DTYPE_CNT=`git diff -U0 --diff-filter=A upstream/$BRANCH |grep "+" |grep -co "IndicateVarDataType" || true`
461461
if [ ${GET_KERNEL_TYPE_FUNC_CNT} -gt ${INDICATE_VAR_DTYPE_CNT} ]; then
462-
echo_line="If you override GetExpectedKernelType method of OperatorWithKernel, please use OperatorWithKernel::IndicateVarDataType() method to get specific input variable's dtype, which checked whether the input variable is initialized (The details in https://github.com/PaddlePaddle/FluidDoc/pull/1527). If you don't use this method to check, you must have one RD (zhangbo9674 or phlrain or luotao1) approval for the usage of other methods.\n"
463-
check_approval 1 luotao1 zhangbo9674 phlrain
462+
echo_line="If you override GetExpectedKernelType method of OperatorWithKernel, please use OperatorWithKernel::IndicateVarDataType() method to get specific input variable's dtype, which checked whether the input variable is initialized (The details in https://github.com/PaddlePaddle/FluidDoc/pull/1527). If you don't use this method to check, you must have one RD (zhangbo9674 or phlrain ) approval for the usage of other methods.\n"
463+
check_approval 1 zhangbo9674 phlrain
464464
fi
465465
fi
466466

467467
HAS_OPERATORBASE_FLAG=`git diff -U0 --diff-filter=A upstream/$BRANCH | grep -E "public[[:space:]]+.*OperatorBase" || true`
468468
if [ "${HAS_OPERATORBASE_FLAG}" != "" ] && [ "${PR_ID}" != "" ]; then
469-
echo_line="In order to support dynamic graph, all ops are not recommended to inherit OperatorBase. Please use OperatorWithKernel instead.\nYou must have one RD (phlrain (Recommend), luotao1, XiaoguangHu01) approval for the inherit of OperatorBase.\nYou inherit the OperatorBase class. The corresponding lines are as follows:\n${HAS_OPERATORBASE_FLAG}"
470-
check_approval 1 phlrain luotao1 XiaoguangHu01
469+
echo_line="In order to support dynamic graph, all ops are not recommended to inherit OperatorBase. Please use OperatorWithKernel instead.\nYou must have one RD (phlrain (Recommend), XiaoguangHu01) approval for the inherit of OperatorBase.\nYou inherit the OperatorBase class. The corresponding lines are as follows:\n${HAS_OPERATORBASE_FLAG}"
470+
check_approval 1 phlrain XiaoguangHu01
471471
fi
472472

473473
HAS_INPLACE_TESTS=`git diff -U0 upstream/$BRANCH |grep "+" |grep -E "inplace_atol[[:space:]]*=.*" || true`
474474
if [ "${HAS_INPLACE_TESTS}" != "" ] && [ "${PR_ID}" != "" ]; then
475-
echo_line="The calculation results of setting inplace enabled and disabled must be equal, that is, it's not recommended to set inplace_atol.\n If you do need to use inplace_atol, you must have one RD (XiaoguangHu01, phlrain, luotao1, QingshuChen) approval for the usage of inplace_atol.\nThe corresponding lines are as follows:\n${HAS_INPLACE_TESTS}\n"
476-
check_approval 1 XiaoguangHu01 phlrain luotao1 QingshuChen
475+
echo_line="The calculation results of setting inplace enabled and disabled must be equal, that is, it's not recommended to set inplace_atol.\n If you do need to use inplace_atol, you must have one RD (XiaoguangHu01, phlrain, QingshuChen) approval for the usage of inplace_atol.\nThe corresponding lines are as follows:\n${HAS_INPLACE_TESTS}\n"
476+
check_approval 1 XiaoguangHu01 phlrain QingshuChen
477477
fi
478478

479479
OP_FILE_CHANGED=`git diff --name-only --diff-filter=AMR upstream/$BRANCH |grep -oE ".+_op..*" || true`
@@ -488,8 +488,8 @@ if [ "${OP_FILE_CHANGED}" != "" ] && [ "${PR_ID}" != "" ]; then
488488
done
489489
if [ "${ERROR_LINES}" != "" ]; then
490490
ERROR_LINES=${ERROR_LINES//+/'\n+\t'}
491-
echo_line="Using ShareDataWith or ShareBufferWith is not recommended. You must have one RD's (zhhsplendid (Recommend), zhiqiu or luotao1) approval to use these methods. For more information, please refer to https://github.com/PaddlePaddle/Paddle/wiki/ShareDataWith-is-prohibited-in-OP. The error lines are as follows:${ERROR_LINES}"
492-
check_approval 1 zhhsplendid zhiqiu luotao1
491+
echo_line="Using ShareDataWith or ShareBufferWith is not recommended. You must have one RD's (zhhsplendid (Recommend), zhiqiu) approval to use these methods. For more information, please refer to https://github.com/PaddlePaddle/Paddle/wiki/ShareDataWith-is-prohibited-in-OP. The error lines are as follows:${ERROR_LINES}"
492+
check_approval 1 zhhsplendid zhiqiu
493493
fi
494494
fi
495495

@@ -505,8 +505,8 @@ if [ "${CMAKE_FILE_CHANGED}" != "" ] && [ "${PR_ID}" != "" ]; then
505505
done
506506
if [ "${ERROR_LINES}" != "" ]; then
507507
ERROR_LINES=${ERROR_LINES//+/'\n+\t'}
508-
echo_line="Change compilation flag of warnings is not recommended. You must have one RD's (zhiqiu (Recommend), luotao1 or phlrain) approval to use these methods. "
509-
check_approval 1 zhiqiu luotao1 phlrain
508+
echo_line="Change compilation flag of warnings is not recommended. You must have one RD's (zhiqiu (Recommend), phlrain) approval to use these methods. "
509+
check_approval 1 zhiqiu phlrain
510510
fi
511511
fi
512512

@@ -519,8 +519,8 @@ if [ "${NEW_OP_TEST_ADDED}" != "" ] && [ "${PR_ID}" != "" ]; then
519519
CHECK_WHOLE=$CHECK_OUTPUT$CHECK_OUTPUT_WITH_PLACE$CHECK_GRAD$CHECK_GRAD_CHECK
520520
if [ "${CHECK_WHOLE}" != "" ] ; then
521521
CHECK_OP=${CHECK_WHOLE//+/'\n+'}
522-
echo_line="Please use the default precision parameters of 'atol, rtol, eps, max_relative_error'. If you don't use the default value, you must have one RD (Xreki (Recommend), QingshuChen(Recommend for kunlun), zhiqiu, luotao1, phlrain or ZzSean) approval for the usage of other values. The detailed information is in the link: https://github.cor/PaddlePaddle/Paddle/wiki/OP-test-accuracy-requirements. The error line is ${CHECK_OP}\n"
523-
check_approval 1 Xreki QingshuChen zhiqiu luotao1 phlrain
522+
echo_line="Please use the default precision parameters of 'atol, rtol, eps, max_relative_error'. If you don't use the default value, you must have one RD (Xreki (Recommend), QingshuChen(Recommend for kunlun), zhiqiu, phlrain or ZzSean) approval for the usage of other values. The detailed information is in the link: https://github.cor/PaddlePaddle/Paddle/wiki/OP-test-accuracy-requirements. The error line is ${CHECK_OP}\n"
523+
check_approval 1 Xreki QingshuChen zhiqiu phlrain
524524
fi
525525
fi
526526

@@ -536,8 +536,8 @@ if [ "${UNITTEST_FILE_CHANGED}" != "" ] && [ "${PR_ID}" != "" ]; then
536536
done
537537
if [ "${ERROR_LINES}" != "" ]; then
538538
ERROR_LINES=${ERROR_LINES//+/'\n+\t'}
539-
echo_line="It is an Op accuracy problem, please take care of it. You must have one RD (zhangting2020 (Recommend), luotao1 or phlrain, QingshuChen) approval for the usage (either add or delete) of @skip_check_grad_ci. For more information, please refer to: https://github.com/PaddlePaddle/Paddle/wiki/Gradient-Check-Is-Required-for-Op-Test. The corresponding lines are as follows:\n${ERROR_LINES}\n"
540-
check_approval 1 zhangting2020 luotao1 phlrain QingshuChen
539+
echo_line="It is an Op accuracy problem, please take care of it. You must have one RD (zhangting2020 (Recommend), or phlrain, QingshuChen) approval for the usage (either add or delete) of @skip_check_grad_ci. For more information, please refer to: https://github.com/PaddlePaddle/Paddle/wiki/Gradient-Check-Is-Required-for-Op-Test. The corresponding lines are as follows:\n${ERROR_LINES}\n"
540+
check_approval 1 zhangting2020 phlrain QingshuChen
541541
fi
542542
fi
543543

@@ -586,12 +586,12 @@ UNITYBUILD_RULE_CHANGED=$(git diff --name-only upstream/$BRANCH |
586586
grep "unity_build_rule.cmake" || true)
587587
if [ -n "${UNITYBUILD_RULE_CHANGED}" -a -n "${PR_ID}" ]; then
588588
echo_line="You must have one RD (Avin0323(Recommend) or zhwesky2010 or
589-
wanghuancoder or luotao1) approval for modifying
589+
wanghuancoder) approval for modifying
590590
unity_build_rule.cmake which the rules of Unity Build."
591591
echo_line=$(echo ${echo_line})
592592
# Avin0323(23427135) zhwesky2010(52485244)
593593
# wanghuancoder(26922892) luotao1(6836917)
594-
check_approval 1 Avin0323 zhwesky2010 wanghuancoder luotao1
594+
check_approval 1 Avin0323 zhwesky2010 wanghuancoder
595595
fi
596596

597597
if [ -n "${echo_list}" ];then

0 commit comments

Comments
 (0)