Closed dm4 closed 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:
n-preidct
option, which should be corrected to n-predict
. Additionally, the reverse_prompt
environment variable is not being handled, which might be unintentional.On the positive side, the patch also includes some important improvements:
.gguf
extension in any directory.options
JSON object instead of separate variables.stream_stdout
option is now checked using the as_bool()
method instead of string parsing.stream-stdout
option is not set to true
.main.rs
file provides an example of setting options via an input tensor.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.
Key changes:
Potential problems:
Key changes:
options
JSON object.options
JSON object is now used to set the options instead of using separate variables.stream_stdout
option is now checked using the as_bool()
method instead of parsing a string.stream-stdout
is not true
.Potential problems:
match
statements, it is not clear what should be done if parsing the environment variable fails. Currently, it silently does nothing. It might be better to log an error or handle the failure in some way.n-preidct
key in options
seems to be a typo and should be n-predict
.reverse_prompt
environment variable is not being handled, which might be unintentional.let options["n-preidct"] = serde_json::from_str(val.as_str()).unwrap(),
which should be options["n-predict"]
.options
object.Overall, these findings should be addressed and the code could benefit from further review and improvements.
Key changes:
.config(options.to_string())
to the GraphBuilder
chain.Potential problems:
Key changes in the patch:
Potential problems:
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.
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
.
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 tomaster
.
Okay, I have just changed the target branch to the dev
branch.
@hydai, according to our previous discussion, I have made updates to the README and have kept the previous metadata setting code as a comment.
This PR depends on: