PennyLaneAI / PennyLaneAI/catalyst
Minor issue in the CompiledFunction call interface
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Happened upon this by chance, but it appears to me the following line is erroneous:
https://github.com/PennyLaneAI/catalyst/blob/834b582c68ecdf6e3f759fcf8c4de88bcef67bb1/frontend/catalyst/compiled_functions.py#L318
args is defined up here and always consists of two elements, the args tuple and the kwargs dict:
https://github.com/PennyLaneAI/catalyst/blob/834b582c68ecdf6e3f759fcf8c4de88bcef67bb1/frontend/catalyst/compiled_functions.py#L296-L304
My guess is maybe the author intended to check the length of args_data, but I'm not 100% sure. Apparently this mistake doesn't cause any issues (except when I was messing around with the CompiledFunction internals directly).
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 in frontend/catalyst/compiled_functions.py around lines 296–304 and 318, then compare the handling of args with args_data in the CompiledFunction call interface. Confirm which length is intended and verify the behavior when calling CompiledFunction internals directly; done means the erroneous check is corrected without changing normal calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100