mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[Dynamo][Better Engineering] Type annotation for torch/_dynamo/output_graph.py
(#159602)
As part of better engineering effort, we would like to improve out type support to improve dev experience in dynamo This PR adds strict typing support to `torch/_dynamo/output_graph.py` Running ``` mypy torch/_dynamo/output_graph.py --linecount-report /tmp/coverage_log ``` | -------- | Lines Annotated | Lines Total | % lines covered | Funcs Annotated | Funcs Total | % funcs covered | | -------- | ------- | -------- | ------- | ------- | ------- | ------- | | Main | 2163 | 4792 | 45.14% | 121 | 268 | 45.15% | | This PR | 4818 | 4818 | 100.00% | 268 | 268 | 100.00% | | Delta | +2655 | +26 | +54.84% | +147 | 0 | +54.85% | Pull Request resolved: https://github.com/pytorch/pytorch/pull/159602 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
4fd5fabee9
commit
b6c53383fe
@ -204,7 +204,7 @@ def debug_insert_nops(
|
||||
graph = OutputGraph(
|
||||
code_options={},
|
||||
compiler_fn=None,
|
||||
root_tx=None,
|
||||
root_tx=None, # type: ignore[arg-type]
|
||||
export=False,
|
||||
export_constraints=None,
|
||||
frame_state={"_id": 0},
|
||||
|
Reference in New Issue
Block a user