[Just for review]add dynamic reset node interface#2
Open
JackLau1222 wants to merge 11 commits intomasterfrom
Open
[Just for review]add dynamic reset node interface#2JackLau1222 wants to merge 11 commits intomasterfrom
JackLau1222 wants to merge 11 commits intomasterfrom
Conversation
JackLau1222
commented
Oct 25, 2025
| Graph(Graph &&rhs) = default; | ||
|
|
||
| private: | ||
| private: |
bmf/engine/connector/src/builder.cpp
Outdated
|
|
||
| void RealNode::SetAction(std::string const &action) { | ||
| action_ = action; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
builder层应该不需要Set方法 直接修改变量值就可以 你看下相关代码确认下
bmf/engine/connector/src/builder.cpp
Outdated
| // 添加action字段输出 | ||
| if (!action_.empty()) { | ||
| info["action"] = action_; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
只有一行逻辑可以不需要大括号 简化为
if (!action_.empty())
info["action"] = action_;
bmf/engine/connector/src/builder.cpp
Outdated
| // 获取更新图的配置 | ||
| auto graph_config = update_graph->Dump(); | ||
|
|
||
| std::string config_str = graph_config.dump(); |
Collaborator
Author
There was a problem hiding this comment.
应该可以简化为
std::string config_str = to_string(update_graph->Dump());
bmf/engine/connector/src/builder.cpp
Outdated
| return 0; | ||
| } | ||
|
|
||
| void RealGraph::DynamicResetNode(const bmf_sdk::JsonParam& node_config) { |
Collaborator
Author
There was a problem hiding this comment.
接口名改成DynamicReset
bmf/engine/connector/src/builder.cpp
Outdated
| // 在当前图中创建重置节点 | ||
| std::vector<std::shared_ptr<RealStream>> empty_inputs; | ||
| auto reset_node = AddModule(alias, bmf_sdk::JsonParam(node_config.json_value_), | ||
| empty_inputs, "", Python, "", "", Immediate, 0); |
Collaborator
Author
There was a problem hiding this comment.
empty_inputs看起来是多余的 可以直接用{}代替
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.
No description provided.