feat: use DTO for NCNN init parameters#1147
Draft
sileht wants to merge 2 commits intojolibrain:masterfrom
Draft
Conversation
Collaborator
|
Thanks, sounds simple. What do think about putting the backend DTOs headers into |
Contributor
|
This pull request is now in conflict :( |
bcf2ebb to
9d688cc
Compare
109e8c4 to
45db8cd
Compare
beniz
reviewed
Feb 13, 2021
tests/ut-ncnnapi.cc
Outdated
| "true, \"height\":136,\"width\":220},\"mllib\":{\"nclasses\":69}}}"; | ||
| std::string joutstr = japi.jrender(japi.service_create(sname, jstr)); | ||
|
|
||
| auto service_create = dd::DTO::ServiceCreate::createShared(); |
Collaborator
There was a problem hiding this comment.
Is there a way of creating the DTO object directly from the JSON string ?
Contributor
Author
There was a problem hiding this comment.
Yes, and that's a good idea to do it in tests, it will ensure the current json string still work as-is.
The Service Create call works, but most parameters doesn't. Supported parameters are only those declared in the DTO files. To not update all input/output connector code. This PR just convert the DTO into APIData to pass it to connector. /!\ But beware if a parameters is not present in the DTO it will be ignored and will not be present in the generated APIData passed to the connectors. /!\ That's why we need first to fill the InputConnector and OutputConnector with all possible option from all type and all backends. cmake .. -D USE_HTTP_SERVER_OATPP=ON -D USE_HTTP_SERVER=OFF -D USE_NCNN=ON -D USE_CAFFE=OFF -DUSE_COMMAND_LINE=OFF
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
Contributor
|
This pull request is now in conflict :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: use DTO for NCNN init parameters
refactor(dto): example service_create+ncnn
The Service Create call works, but most parameters doesn't.
Supported parameters are only those declared in the DTO files.
To not update all input/output connector code. This PR just
convert the DTO into APIData to pass it to connector.
/!\ But beware if a parameters is not present in the DTO it will be
ignored and will not be present in the generated APIData passed to the
connectors. /!\
That's why we need first to fill the InputConnector and OutputConnector
with all possible option from all type and all backends.
cmake .. -D USE_HTTP_SERVER_OATPP=ON -D USE_HTTP_SERVER=OFF -D USE_NCNN=ON -D USE_CAFFE=OFF -DUSE_COMMAND_LINE=OFF