pytorch/torch/export
Pian Pawakapan cbc4094298 [draft_export] add LOC for data-dep error logging (#145443)
Summary:
maybe this is too much info, but it's difficult to go through old draft export reports where the stack trace is out of sync with the current codebase. Data-dependent errors now look like:
```
2. Data dependent error.
    When exporting, we were unable to evaluate the value of `u306`.
    This occurred at the following stacktrace:
    File /data/users/pianpwk/fbsource/buck-out/v2/gen/fbcode/78204cab86e8a0fb/sigmoid/inference/ts_migration/__pt2i_readiness_main__/pt2i_readiness_main#link-tree/caffe2/torch/fb/training_toolkit/common/proxy_module_thrift/embedding_bag_proxy.py, lineno 109, in _forward_impl:
         `if offsets[-1] > len(input):`
    As a result, it was specialized to evaluate to `261`, and asserts were inserted into the graph.
    Please add `torch._check(...)` to the original code to assert this data-dependent assumption.
    Please refer to https://docs.google.com/document/d/1kZ_BbB3JnoLbUZleDT6635dHs88ZVYId8jT-yTFgf3A/edit#heading=h.boi2xurpqa0o for more details.
```

This would be even more helpful for reports on torch-packaged models, but that requires some more work on PT2I-specific stack trace processing

Test Plan: .

Differential Revision: D68534017

Pull Request resolved: https://github.com/pytorch/pytorch/pull/145443
Approved by: https://github.com/angelayi
2025-01-28 18:55:16 +00:00
..
experimental PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
passes PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
__init__.py Use typing.IO[bytes] instead of io.BytesIO in annotations (#144994) 2025-01-27 18:08:07 +00:00
_draft_export.py [draft_export] add LOC for data-dep error logging (#145443) 2025-01-28 18:55:16 +00:00
_remove_auto_functionalized_pass.py remove allow-untyped-defs from torch/export/_remove_auto_functionalized_pass.py (#144230) 2025-01-06 22:23:19 +00:00
_remove_effect_tokens_pass.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
_safeguard.py
_swap.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
_trace.py serde unbacked bindings (#144894) 2025-01-25 02:34:27 +00:00
_tree_utils.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
_unlift.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
custom_obj.py
decomp_utils.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
dynamic_shapes.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
exported_program.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
graph_signature.py PEP585 update - torch/export (#145165) 2025-01-19 20:56:55 +00:00
unflatten.py [BE][Ez]: FURB148 - remove useless enumerate calls (#145619) 2025-01-24 23:37:15 +00:00