Skip to content

Conversation

@zhangting2020
Copy link
Contributor

add decorator to skip check_grd CI:
Check_grad is required for Op test cases. However, there are specical cases that do not need to check_grad. The decorator is used to avoid failures of check_grad checking.

Note: The execution of unit test will not be skipped. It just avoids check_grad checking in tearDownClass method by setting a no_need_check_grad flag.

Copy link
Contributor

Choose a reason for hiding this comment

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

check_grd typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

there are some special(typo) cases that do not need to do check_grad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

This decorator is used to skip the check_grad of the above cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Other cases in NO_NEED_CHECK_GRAD_CASES will use the skip_check_grad_ci wrapper later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

How about the followings? i.e remove line68-71

@skip_check_grad_ci(note)
class TestLookupTableOpWithPadding(TestLookupTableOp):
   def setUp(self):
     xxx
   def test_check_output(self):
     xxx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@zhangting2020 zhangting2020 force-pushed the skip_check_grad_ci branch 4 times, most recently from dc73883 to 18e6245 Compare December 19, 2019 12:17
luotao1
luotao1 previously approved these changes Dec 19, 2019
Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice job! Please Monitor the skip_check_grad_ci in next PR!

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit 538c848 into PaddlePaddle:develop Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants