-
Notifications
You must be signed in to change notification settings - Fork 731
Refactor BlockFactory interface #1045
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
Change-Id: I7e9aa60f541c00852c548332338ee0fc914ee92f
Codecov Report
@@ Coverage Diff @@
## master #1045 +/- ##
============================================
- Coverage 70.36% 70.35% -0.01%
+ Complexity 5168 5166 -2
============================================
Files 508 509 +1
Lines 23084 23080 -4
Branches 2429 2428 -1
============================================
- Hits 16242 16237 -5
Misses 5536 5536
- Partials 1306 1307 +1
Continue to review full report at Codecov.
|
| * @throws IOException if IO operation fails during creating block | ||
| */ | ||
| Block newBlock(NDManager manager); | ||
| Block newBlock(Model model, Path modelPath, Map<String, ?> arguments) throws IOException; |
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.
Is this right? I thought the plan was to use BlockFactory to deprecate the Map<String, ?> arguments and replace it with serializing the BlockFactory?
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.
The purpose of BlockFactory is to create the Block then you can load the parameters into the Block.
The problem is the BlockFactory may need extra information:
- Some files in the model directory
- some model specific arguments. If we hard-code those arguments, which will make the BlockFactory implementation not re-useable.
Change-Id: I7e9aa60f541c00852c548332338ee0fc914ee92f
Description
Brief description of what this PR is about