search-r1 reproduction apply_chat_template problem
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 1.3k
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 22
Description
I followed the instructions for Search-R1 exactly, but I encountered the following bug. Note: I did not change any code.
Status message: Job entrypoint command failed with exit code 1, last available logs (truncated to 20,000 chars):
sample = await custom_generate_func(args, sample, sampling_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/slime-main/examples/search-r1/generate_with_search.py", line 156, in generate
assert isinstance(prompt, np.ndarray), "prompt should be a np.ndarray when apply_chat_template is True"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
Follow the Search-R1 instructions to reproduce the failure, then start in examples/search-r1/generate_with_search.py around line 156. Trace how prompt is produced before generate; done means the reproduction no longer fails the apply_chat_template assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100