second-state / WasmEdge-WASINN-examples

Apache License 2.0
217 stars 36 forks source link

Set metadata when building graph #63

Closed dm4 closed 6 months ago

dm4 commented 6 months ago

This PR depends on:

juntao commented 6 months ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Overall Summary:

The pull request titled "Set metadata when building graph" includes several key changes to the codebase.

In terms of potential problems and errors, the following issues were identified:

On the positive side, the patch also includes some important improvements:

In conclusion, the pull request contains both potential issues and important improvements. The identified issues should be addressed, and further improvements can be made to provide more clarity, completeness, and error handling in the code.

Details

Commit b5fa3024e1dcb6f1ef96512b5d65a0452f3f8a42

Key changes:

Potential problems:

Commit 3dbd8270351f75136ec912d919c794d6d6a8559b

Key changes:

Potential problems:

Overall, these findings should be addressed and the code could benefit from further review and improvements.

Commit f6089c22e97be72fc5bfa2972f9657abdde4eb32

Key changes:

Potential problems:

  1. It seems that the code to set the options as an input to the context has been removed without any clear indication of the reason. This might have unintended consequences and should be further investigated.
  2. The patch does not provide any information about the purpose or expected behavior of setting the metadata when building the graph. It would be helpful to include this information to ensure a thorough review.
  3. The commit message does not provide sufficient context or reasoning for making the changes. It is recommended to provide more detailed information to help other developers understand the motivation behind the changes.

Commit 2df1eb9715c31d9e82981b2bfc65600e576e5aad

Key changes in the patch:

  1. Updated the README.md file to provide more detailed information about the parameters and their usage.
  2. Added a section in the README.md file about setting metadata for the inference using the graph builder and the input tensor.
  3. Added a comment in the main.rs file to provide an example of setting options via an input tensor.

Potential problems:

  1. It would be helpful to provide more examples and explanations for setting metadata using the graph builder and input tensor. This would make it easier for developers to understand and use this feature.
  2. The comment in the main.rs file seems to be incomplete. It mentions checking the README for more details, but the necessary instructions and examples are not provided there. It would be better to include the complete example in the comment itself.

Overall, the patch improves the documentation and adds support for setting metadata during graph building and input tensor creation. However, further improvements can be made to provide more clarity and completeness in the documentation and comments.

hydai commented 6 months ago

Hi @dm4 I think we should use a dev branch for the unreleased features. Once the release assets are updated, then we merge it back to master.

dm4 commented 6 months ago

Hi @dm4 I think we should use a dev branch for the unreleased features. Once the release assets are updated, then we merge it back to master.

Okay, I have just changed the target branch to the dev branch.

dm4 commented 6 months ago

@hydai, according to our previous discussion, I have made updates to the README and have kept the previous metadata setting code as a comment.