-
Notifications
You must be signed in to change notification settings - Fork 52
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
[onnx] Reconstruct torch model from onnx doc_string #511
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,97 @@ | |||
import marko |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To parse doc_string's markdown marko will be used
@@ -421,7 +434,9 @@ def handle_if(self, g: torch._C.Graph, n: torch._C.Node) -> None: | |||
# Generated onnx node doc string should be added later since DCE isn't completed yet | |||
doc_str: str = f""" | |||
## Original node | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be quoted for easier markdown parsing
@@ -384,7 +384,7 @@ def _dump_upgraders_map() -> Dict[str, str]: ... | |||
def _test_only_populate_upgraders(content: Dict[str, str]) -> None: ... | |||
def _test_only_remove_upgraders(content: Dict[str, str]) -> None: ... | |||
def merge_type_from_type_comment(decl: Decl, type_annotation_decl: Decl, is_method: _bool) -> Decl: ... | |||
def parse_ir(input: str, parse_tensor_constants: _bool) -> Graph: ... | |||
def parse_ir(input: str, parse_tensor_constants: _bool = False) -> Graph: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/test |
Hmm, cpu test seems to be running with torch-2.0. Let's fix that first |
Pre-review test seems still failing? |
/test |
https://ci.preferred.jp/pytorch-pfn-extras.torch113-linux/128554/261346#L1514 segv occured in pytest but seems to be a flaky behaviour |
/test |
/test |
v{v.unique()}
to keep names same both in torch graph and onnx graphcheck_reconstruct
option to onnx test utilities