pytorch / pytorch/executorch

Improve error message for unset/missing inputs

Open
#14,525 2 comments 0 reactions 2 assignees View on GitHub

@BashCache is already working on this.

Since Dec 1, 2025.

Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🐛 Describe the bug

When passing fewer inputs to a model than required, the error message is something like Input 1 has not been set. It might be nice to update either method.cpp or module.cpp to output a nicer message like Method forward expects 2 inputs but only 1 was provided. This is a little tricky, as users can set a persistent input and pass fewer inputs to each forward call, but we can probably give a nice message when no persistent input is set, or otherwise customize the error message.

Versions

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.