ConstraintViolationError
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
Hi,
I just upgraded to executorch 0.4 and ran my code which previously failed as described in
https://github.com/pytorch/executorch/issues/1350
Now it fails with
ConstraintViolationError
Please find the error log below.
Please let me know if you need additional information.
Thanks
ERROR LOG
Traceback (most recent call last):
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 670, in _export_to_aten_ir
produce_guards_callback(gm)
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 1655, in _produce_guards_callback
return produce_guards_and_solve_constraints(
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/_export/non_strict_utils.py", line 287, in produce_guards_and_solve_constraints
raise constraint_violation_error
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/_export/non_strict_utils.py", line 270, in produce_guards_and_solve_constraints
shape_env.produce_guards(
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py", line 3788, in produce_guards
raise ConstraintViolationError(
torch.fx.experimental.symbolic_shapes.ConstraintViolationError: L['args'][0][1].size()[1] = 12 is not equal to L['args'][0][0].size()[1] = 7
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adonnini1/Development/ContextQSourceCode/NeuralNetworks/adonnini-trajectory-prediction-transformers-masterContextQ/train-minimum.py", line 443, in <module>
pre_autograd_aten_dialect = torch.export._trace._export(
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 1017, in wrapper
raise e
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 990, in wrapper
ep = fn(*args, **kwargs)
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/exported_program.py", line 114, in wrapper
return fn(*args, **kwargs)
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 1880, in _export
export_artifact = export_func( # type: ignore[operator]
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 1683, in _non_strict_export
aten_export_artifact = _to_aten_func( # type: ignore[operator]
File "/home/adonnini1/anaconda3/envs/executorch/lib/python3.10/site-packages/torch/export/_trace.py", line 672, in _export_to_aten_ir
raise UserError(UserErrorType.CONSTRAINT_VIOLATION, str(e)) # noqa: B904
torch._dynamo.exc.UserError: L['args'][0][1].size()[1] = 12 is not equal to L['args'][0][0].size()[1] = 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the export call at train-minimum.py line 443 and trace the reported paths in torch/export/_trace.py, torch/_export/non_strict_utils.py, and torch/fx/experimental/symbolic_shapes.py. Compare the failure with issue 1350 and obtain a minimal reproducible example, since the issue provides no model, project file, or test. Done would require a confirmed cause and a project-level fix or documented resolution for the 12-versus-7 shape constraint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100