mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: - moves logging functionalities into `torch/_export/db/logging.py` file. - add a check in `_dynamo/eval_frame.py` to check for optional input and error out with `UnsupportedError` - change the case name of `torch_sym_int` to `unsupported_operator` - Check if the case name is registered in exportdb, if so, we give a link to the case in exportdb. - TODO: add test Test Plan: CI Running the example in https://pytorch.org/docs/main/generated/exportdb/index.html#optional-input gives the following error logging: ``` E0730 10:53:33.687000 4155538 torch/_dynamo/eval_frame.py:1086] Parameter y is optional with a default value of tensor([[-0.1633, 1.2414, -0.1071], E0730 10:53:33.687000 4155538 torch/_dynamo/eval_frame.py:1086] [-0.1936, -0.9425, -0.0824]]) E0730 10:53:33.688000 4155538 torch/export/_trace.py:1043] See optional_input in exportdb for unsupported case. https://pytorch.org/docs/main/generated/exportdb/index.html#optional-input ...... File "/data/users/shangdiy/fbsource/buck-out/v2/gen/fbcode/389acaeb40d57230/tutorials/pytorch/nntest/__torchtest__/torchtest#link-tree/torch/_dynamo/eval_frame.py", line 1091, in produce_matching raise Unsupported( torch._dynamo.exc.Unsupported: Tracing through optional input is not supported yet ``` It also logs a `export.error.classified` event in Scuba. Reviewed By: zhxchen17 Differential Revision: D60427208 Pull Request resolved: https://github.com/pytorch/pytorch/pull/132420 Approved by: https://github.com/zhxchen17 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| assume_constant_result.py | ||
| autograd_function.py | ||
| class_method.py | ||
| cond_branch_class_method.py | ||
| cond_branch_nested_function.py | ||
| cond_branch_nonlocal_variables.py | ||
| cond_closed_over_variable.py | ||
| cond_operands.py | ||
| cond_predicate.py | ||
| constrain_as_size_example.py | ||
| constrain_as_value_example.py | ||
| decorator.py | ||
| dictionary.py | ||
| dynamic_shape_assert.py | ||
| dynamic_shape_constructor.py | ||
| dynamic_shape_if_guard.py | ||
| dynamic_shape_map.py | ||
| dynamic_shape_round.py | ||
| dynamic_shape_slicing.py | ||
| dynamic_shape_view.py | ||
| fn_with_kwargs.py | ||
| list_contains.py | ||
| list_unpack.py | ||
| model_attr_mutation.py | ||
| nested_function.py | ||
| null_context_manager.py | ||
| optional_input.py | ||
| pytree_flatten.py | ||
| scalar_output.py | ||
| specialized_attribute.py | ||
| static_for_loop.py | ||
| static_if.py | ||
| tensor_setattr.py | ||
| type_reflection_method.py | ||
| unsupported_operator.py | ||
| user_input_mutation.py | ||