Lucas Kabela
ada44e5ba7
[Dynamo][Better Engineering] Add typing to bytecode analysis and transform (#158293)
As part of better engineering week, we would like to improve out type support to improve dev experience in dynamo
This PR adds strict typing support to a critical tracing point for dynamo, `bytecode_transformation.py` and by extension, `bytecode_analysis.py`
Running
```
mypy torch/_dynamo/bytecode_transformation.py torch/_dynamo/bytecode_analysis.py --linecount-report /tmp/coverage_log
```
| -------- | Lines Unannotated | Lines Total | % lines covered | Funcs Unannotated | Funcs Total | % funcs covered |
| -------- | ------- | -------- | ------- | ------- | ------- | ------- |
| Main | 1422 | 1920 | 74.06% | 73 | 93 | 78.49% |
| This PR | 1968 | 1968 | 100.00% | 93 | 93 | 100.00% |
| Delta | +546 | +48 | +25.94% | 20 | 0 | +21.51% |
Pull Request resolved: https://github.com/pytorch/pytorch/pull/158293
Approved by: https://github.com/StrongerXi, https://github.com/Skylion007
2025-07-16 21:50:55 +00:00
..
2025-07-15 19:14:06 +00:00
2025-07-10 22:50:39 +00:00
2025-07-10 20:30:27 +00:00
2025-07-15 23:48:20 +00:00
2025-07-11 03:41:33 +00:00
2025-06-23 02:57:19 +00:00
2025-07-16 21:50:55 +00:00
2025-07-16 21:50:55 +00:00
2025-06-23 02:57:19 +00:00
2025-06-30 01:23:59 +00:00
2025-02-13 00:02:21 +00:00
2025-07-12 06:25:46 +00:00
2025-06-21 18:33:46 +00:00
2025-02-28 03:03:53 +00:00
2025-07-10 23:11:18 +00:00
2025-07-15 00:53:52 +00:00
2025-01-18 20:47:11 +00:00
2025-02-13 00:02:21 +00:00
2025-06-11 19:44:18 +00:00
2025-07-07 23:04:02 +00:00
2025-07-16 03:59:41 +00:00
2025-06-24 04:59:49 +00:00
2025-07-10 17:18:37 +00:00
2025-07-08 23:08:06 +00:00
2025-06-26 21:40:38 +00:00
2025-03-11 19:49:28 +00:00
2025-04-11 09:07:01 +00:00
2025-07-14 01:22:49 +00:00
2025-05-13 12:17:59 +00:00
2025-06-23 02:57:19 +00:00
2025-05-13 12:17:59 +00:00
2025-07-12 06:25:46 +00:00
2025-06-10 22:40:58 +00:00
2025-06-11 19:44:18 +00:00
2025-04-22 03:29:13 +00:00
2025-04-24 17:57:54 +00:00
2025-07-12 05:47:06 +00:00
2025-07-15 00:53:52 +00:00
2025-06-21 06:15:51 +00:00
2025-07-07 23:57:17 +00:00
2025-02-13 00:02:21 +00:00
2025-02-13 00:02:21 +00:00
2025-07-16 21:50:55 +00:00
2025-07-15 23:48:20 +00:00
2025-07-12 06:25:46 +00:00
2025-07-16 21:50:55 +00:00
2025-02-13 00:02:21 +00:00
2025-07-02 15:04:00 +00:00
2025-04-23 09:12:13 +00:00
2025-06-19 12:49:04 +00:00
2025-06-13 13:54:10 +00:00
2025-07-12 06:25:46 +00:00
2025-06-24 04:59:49 +00:00
2025-07-11 03:41:33 +00:00