-
Notifications
You must be signed in to change notification settings - Fork 60
MultiPack to SinglePack boxer #564
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
Codecov Report
@@ Coverage Diff @@
## master #564 +/- ##
==========================================
+ Coverage 80.62% 80.68% +0.05%
==========================================
Files 237 238 +1
Lines 16930 16986 +56
==========================================
+ Hits 13650 13705 +55
- Misses 3280 3281 +1
Continue to review full report at Codecov.
|
the PR message need to be updated as the following:
|
The correct way to write the PR message is as follow:
You need to remove the square brackets |
@@ -0,0 +1,80 @@ | |||
#begin document (bn/abc/00/abc_0039); part 000 |
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.
I think we can reuse the current dataset without adding a new file
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.
we should remove this file if it is no longer needed
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.
overall looks fine to me, I think we just need to remove the redundant file and fix the CI to merge this.
btw, besides removing the redundant |
This PR fixes #561
Description of changes
This PR creates a new class "DataPackBoxer" to cast a DataPack from a MultiPack, where the DataPack is the only content of the original MultiPack, indexed by the attribute
pack_name
. It would be able to auto-box the multi-pack into a data-pack by simple 'getting pack' and returning an iterator that produces the boxed data-pack.Possible influences of this PR.
Forte already has a MultiPackBoxer that can cast DataPack into MultiPack. The PR will be able to add a new caster that can perform the opposite conversion, casting MultiPack to DataPack.
Test Conducted
A test case "test_datapack_boxer()" is designed and added in "data_type_infer_test.py", which can be used to test the caster by checking the output_pack_type is DataPack while input_pack_type is MultiPack.