meta-pytorch / meta-pytorch/KernelAgent
BeamSearchStrategy: silent worker starvation when num_expanding_parents=0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 556
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Describe the bug
num_expanding_parents accepts 0 and negative values without validation.
A value of 0 causes select_candidates() to return an empty candidate list,
spawning zero workers per round. All max_rounds rounds complete silently
with no optimization progress and no error or warning surfaced.
location: triton_kernel_agent/opt_worker_component/searching/strategy/beam_search.py
reproduction:
from triton_kernel_agent.opt_worker_component.searching import BeamSearchStrategy
s = BeamSearchStrategy(num_expanding_parents=0)
s.initialize(program)
candidates = s.select_candidates(round_num=1)
# candidates is empty and zero workers spawn, rounds consumed silently
two related problems I found:
BeamSearchStrategycandidate dicts are missing theinspirationskey
required by theSearchStrategyProtocol.GreedyStrategyalready
provides this key; the inconsistency means futureMutatorimplementations
readinginspirationsfrom the candidate dict would silently get nothing
under beam search.ptx_hash_from_cachesilently skips unreadable PTX files with no log
output, returning an incomplete fingerprint with no indication to the caller.
Have a fix ready for all three with 19 new tests in PR #146. All 72 existing tests
pass
Platform and Version
main branch, tested on Google Colab (NVIDIA T4 GPU), Python 3.12
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 triton_kernel_agent/opt_worker_component/searching/strategy/beam_search.py, especially BeamSearchStrategy.select_candidates(), then compare its candidate dictionaries with GreedyStrategy and the SearchStrategy Protocol. Locate ptx_hash_from_cache and review PR #146 and its 19 new tests; done means invalid parent counts are handled, inspirations is present, and unreadable PTX files are reported without silent incomplete results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100