Merged
Conversation
doombeaker
reviewed
Dec 26, 2023
Co-authored-by: Yao Chi <later@usopp.net>
Co-authored-by: Yao Chi <later@usopp.net>
doombeaker
approved these changes
Dec 26, 2023
strint
reviewed
Dec 26, 2023
| *, | ||
| use_graph=True, | ||
| options={}, | ||
| graph_path=None, |
Collaborator
There was a problem hiding this comment.
这些放到 options 里面吧,oneflow_compile 要谨慎扩展参数
Contributor
Author
There was a problem hiding this comment.
好的就是传入 options = { "graph_config": (graph_path, graph_device)} 这种吗 还是 options = { "graph_path":graph_path, "graph_device":graph_device}
Collaborator
There was a problem hiding this comment.
graph_file, graph_file_device
strint
reviewed
Dec 26, 2023
| return | ||
| graph_device = torch2oflow(self._graph_config[1]) | ||
| self.load_graph(graph_path, graph_device) | ||
| self._graph_config = None |
Collaborator
There was a problem hiding this comment.
_graph_config 这个命名改准确一点吧,太宽泛了
strint
reviewed
Dec 26, 2023
| @wraps(func) | ||
| def wrapper(self, *args, **kwargs): | ||
| def _run_func(): | ||
| load_graph_from_config(self) |
Collaborator
There was a problem hiding this comment.
这个功能单独写个 decorator ? 放到 handle_deployable_exception 感觉不合适
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.
使用 OneDiffCheckpointLoader 避免用户 手动指定使用保存的 graph。

如下图避免用户使用 画红框的节点 ,引发不必要的麻烦。