-
Notifications
You must be signed in to change notification settings - Fork 60
Remove processors in forte-wrappers from Forte #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit ab07230.
1> Due to the effect on the following files: Also need to change the following import in future: 2> Due to the effect on the following files: 3> Due to the effect on the following files(will cause test case failure): Also need to change the following files in future: |
Codecov Report
@@ Coverage Diff @@
## master #454 +/- ##
==========================================
- Coverage 82.77% 82.73% -0.04%
==========================================
Files 214 204 -10
Lines 14693 14128 -565
==========================================
- Hits 12162 11689 -473
+ Misses 2531 2439 -92
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing the code and also update the examples.
One thing is this causes two test coverage decrease:
-
https://app.codecov.io/gh/asyml/forte/compare/454/changes#D1L327
Here we probably have a test case the throws aProcessorConfigError
. Can we add a small test case back to cover this part? -
https://app.codecov.io/gh/asyml/forte/compare/454/changes#D4L46
This part is because we shouldn't have used any allennlp results in the main repo now. So we should check whether we can remove these code. There are two functions about allennlp in this file, can you check if we can remove both of them?
Btw, thanks for listing out all the processors that we plan to remove, can you open some issues to track them? For each of them we can decide a strategy to remove them, and each of them can be a separate issue.
I have checked the previous test cases, these lines were covered by Allennlp processor. It has a config check in initialize function, for example, https://github.com/asyml/forte/blob/master/forte/processors/third_party/allennlp_processors.py#L53. I checked several processors that have configs in current forte repo, and they don't have similar checks. So even if we wrote similar test cases, the same error could not be raised. So, if we want to cover these lines, we need to add similar checks in the current forte processors, which means to change the current forte processors. Do we want to do this at the current step?
Yes I will removed them.
|
So we now learn that it is a bad practice to test framework functions using specific implementations. In many of our other test cases, we create "dummy processors" that help us check the behavior, example like below: https://github.com/asyml/forte/blob/master/tests/forte/pipeline_test.py#L255 |
Thanks for pointing this file. I added a new test for config check, it now can cover those lines. |
This PR partially fixes #453.
Description of changes
Removed some third party processors to forte-wrapper repo, and corresponding test cases. Imports were also changed.
Possible influences of this PR.
Describe what are the possible side-effects of the code change.
Test Conducted
Describe what test cases are included for the PR.