huggingface / huggingface/agents-course
[HANDS-ON BUG] First_agent_template broken with smolagents > 1.13.0
- Dominant language
- MDX
- Stars
- 32.6k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The current version of smolagents is 1.17.0
The `First_agent_template` as well as all spaces created during the course so far throw the following error with `smolagents > 1.13.0`
```
runtime error
Exit code: 1. Reason:
tool.py: 0%| | 0.00/635 [00:00
agent = CodeAgent(
File "/usr/local/lib/python3.10/site-packages/smolagents/agents.py", line 1204, in __init__
super().__init__(
File "/usr/local/lib/python3.10/site-packages/smolagents/agents.py", line 207, in __init__
assert not missing_keys, (
AssertionError: Some prompt templates are missing from your custom `prompt_templates`: {'final_answer'}
```
**To Reproduce**
replace `smolagents==1.13.0` with `smolagents` in `requirements.txt`
**Additional context**
the "workaround" by putting `smolagents==1.13.0` into `requirements.txt` is not useful for various reasons:
- it masks the problem instead of fixing it
- new users are bound to a long outdated smolagents version instead of using the latest one
- all existing spaces that used the unpatched template are suddenly broken
- there is no guidance or information on how to fix the problem
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.