Skip to content
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

[Tools/Confchk] Show custom property description for sub-plugins @open sesame 10/15 19:48 #2800

Merged
merged 1 commit into from Nov 20, 2020

Conversation

dongju-chae
Copy link
Member

@dongju-chae dongju-chae commented Oct 15, 2020

This patch adds feature to show custom property description for
registered sub-plugins.

Related issue: #2782

Please share your opinions on better text formatting or recommended structure that contains related info.

For example, we can expect the following result

$ ./nnstreamer-check
...
NNStreamer registered sub-plugins:                                                           
============================================================                                 
                                                                                             
[Filter]                                                                                     
  cpp                                                                                        
    - No custom property found                                                               
  openvino                                                                                   
    - No custom property found                                                               
  tensorflow-lite                                                                            
    - Prop1: Descriptions1                                                                   
    - Prop2: Descriptions2                                                                   
  snpe                                                                                       
    - No custom property found                                                               
  caffe2                                                                                     
    - No custom property found                                                               
  python3                                                                                    
    - No custom property found                                                               
  python2                                                                                    
    - No custom property found                                                               
  edgetpu                                                                                    
    - No custom property found                                                               
  pytorch                                                                                    
    - No custom property found                                                               
  tensorflow                                                                                 
    - No custom property found                                                               
                                                                                             
[Decoder]                                                                                    
  image_segment                                                                              
    - No custom property found                                                               
  direct_video                                                                               
    - No custom property found                                                               
  flatbuf                                                                                    
    - No custom property found                                                               
  bounding_boxes                                                                             
    - No custom property found                                                               
  protobuf                                                                                   
    - Prop1: Descriptions1                                                                   
    - Prop2: Descriptions2                                                                   
  image_labeling                                                                             
    - No custom property found                                                               
  pose_estimation                                                                            
    - No custom property found                                                               
                                                                                             
[Conterver]                                                                                  
  libnnstreamer_converter_protobuf                                                           
    - No custom property found                                                               
  libnnstreamer_converter_flatbuf                                                            
    - Prop1: Descriptions1                                                                   
    - Prop2: Descriptions2                                                                   

if we add descriptions for custom properties like below

diff --git a/ext/nnstreamer/tensor_converter/tensor_converter_flatbuf.cc b/ext/nnstreamer/tensor_converter/tensor_converter_flatbuf.cc
index 0a216f1..7f95711 100644
--- a/ext/nnstreamer/tensor_converter/tensor_converter_flatbuf.cc
+++ b/ext/nnstreamer/tensor_converter/tensor_converter_flatbuf.cc
@@ -163,6 +163,10 @@ void
 init_fbc (void)
 {
   registerExternalConverter (&flatBuf);
+  nnstreamer_converter_set_custom_property_desc (converter_subplugin_flatbuf,
+      "Prop1", "Descriptions1",
+      "Prop2", "Descriptions2",
+      NULL);
 }
 
 /** @brief Destruct this object for tensor converter sub-plugin */
diff --git a/ext/nnstreamer/tensor_decoder/tensordec-protobuf.cc b/ext/nnstreamer/tensor_decoder/tensordec-protobuf.cc
index af3f726..a3fcc34 100644
--- a/ext/nnstreamer/tensor_decoder/tensordec-protobuf.cc
+++ b/ext/nnstreamer/tensor_decoder/tensordec-protobuf.cc
@@ -95,6 +95,11 @@ void
 init_pb (void)
 {
   nnstreamer_decoder_probe (&protobuf);
+  nnstreamer_decoder_set_custom_property_desc (decoder_subplugin_protobuf,
+      "Prop1", "Descriptions1",
+      "Prop2", "Descriptions2",
+      NULL);
+
 }
 
 /** @brief Destruct this object for tensordec-plugin */
diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
index 0dac5f5..c40cc70 100644
--- a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
+++ b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
@@ -1180,6 +1180,10 @@ void
 init_filter_tflite (void)
 {
   nnstreamer_filter_probe (&NNS_support_tensorflow_lite);
+  nnstreamer_filter_set_custom_property_desc (filter_subplugin_tensorflow_lite,
+      "Prop1", "Descriptions1",
+      "Prop2", "Descriptions2",
+      NULL);
 }
 
 /** @brief Destruct the subplugin */

Signed-off-by: Dongju Chae dongju.chae@samsung.com

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

📝 TAOS-CI Version: 1.5.20200324. Thank you for submitting PR #2800. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnsuite.mooo.com/.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, tools/development/confchk/confchk.c does not include Doxygen tags such as @file @brief @author @bug. You must include the Doxygen tags in the source code. Please refer to a Doxygen manual at http://github.com/nnsuite/TAOS-CI/blob/master/ci/doc/doxygen-documentation.md

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, tools/development/confchk/confchk.c includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nnstreamer/wiki/.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://nnsuite.mooo.com/nnstreamer/ci/repo-workers/pr-checker/2800-202010151746470.42231607437134-0817366d64e7cd7541e78089411bb10a270a6a70/.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, tools/development/confchk/confchk.c includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nnstreamer/wiki/.

@dongju-chae
Copy link
Member Author

dongju-chae commented Oct 15, 2020

The CI task for cppcheck looks strange...?
Now, the cppcheck in the CI server is upgraded to v2.2, which is the latest version.

@dongju-chae dongju-chae changed the title [Tools/Confchk] Show custom property description for sub-plugins [Tools/Confchk] Show custom property description for sub-plugins @open sesame 10/15 19:35 Oct 15, 2020
@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, gst/nnstreamer/nnstreamer_conf.c includes bug(s). Please fix incorrect coding constructs in your commit before entering a review process.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 15, 2020

:octocat: cibot: @dongju-chae, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nnstreamer/wiki/.

@dongju-chae dongju-chae changed the title [Tools/Confchk] Show custom property description for sub-plugins @open sesame 10/15 19:35 [Tools/Confchk] Show custom property description for sub-plugins @open sesame 10/15 19:48 Oct 15, 2020
@taos-ci
Copy link
Collaborator

taos-ci commented Oct 22, 2020

@myungjoo
Copy link
Member

myungjoo commented Oct 26, 2020

Wouldn't it be more intuitive if you simply add a list of "name" and "description" pairs to the Framework struct (e.g., add an optional property at the end of the GstTensorFilterFramework data structure)

@dongju-chae
Copy link
Member Author

dongju-chae commented Oct 26, 2020

Wouldn't it be more intuitive if you simply add a list of "name" and "description" pairs to the Framework struct (e.g., add an optional property at the end of the GstTensorFilterFramework data structure)

I have also considered your suggestion, but this feature should be common interface for sub-plugins (e.g., filter, decoder, and converter). So, that's why I utilized more abstract structure (i.e., nnstreamer_subplugin).

@myungjoo
Copy link
Member

Ok, then, please rename the function.
E.g.,
nnstreamer_filter_set_custom_property
==>
nnstreamer_filter_set_custom_property_description

Copy link
Member

@myungjoo myungjoo left a comment

Choose a reason for hiding this comment

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

LGTM. (Rename API names)

@dongju-chae
Copy link
Member Author

Ok, then, please rename the function.

Got it. thanks.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 28, 2020

:octocat: cibot: @dongju-chae, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nnstreamer/wiki/.

1 similar comment
@taos-ci
Copy link
Collaborator

taos-ci commented Oct 28, 2020

:octocat: cibot: @dongju-chae, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nnstreamer/wiki/.

This patch adds feature to show custom property description for
registered sub-plugins.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Copy link
Member

@anyj0527 anyj0527 left a comment

Choose a reason for hiding this comment

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

LGTM Thanks! Near future We should update the custom_property_desc of each module!

@myungjoo myungjoo merged commit 0026577 into nnstreamer:main Nov 20, 2020
@dongju-chae dongju-chae deleted the custom_property branch December 1, 2020 09:38
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.

None yet

4 participants