smolagents unit in the agents course

#7
by burtenshaw HF staff - opened
Hugging Face Agents Course org

This is a discussion to talk about the smolagents unit(s) in the course.

๐Ÿง‘โ€๐ŸŽ“ If you're a student, let us know what you want to learn.
๐Ÿ‘ฉโ€๐Ÿซ If you're a pro, let us know what you want to contribute and your relationship to the framework.

๐Ÿ™‚

Have problems testing the smolagents space from the unit 1. It worked one or two times, then i tried to put some tools and then it never worked again, now also with a clean duplicate it donยดt work. I have this issue:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ New run โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ what time is it in sidney? โ”‚
โ”‚ โ”‚
โ•ฐโ”€ HfApiModel - Qwen/Qwen2.5-Coder-32B-Instruct โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” Step 1 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Error in generating model output:
401 Client Error: Unauthorized for url:
https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruc
t/v1/chat/completions (Request ID:
Root=1-67b61150-72848258349bcff6175bb435;dc1dd1af-db07-4ea3-ba2c-937d53cb4ffd)

Invalid username or password.
[Step 1: Duration 0.02 seconds]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 715, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2088, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1647, in call_function
prediction = await utils.async_iteration(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 728, in async_iteration
return await anext(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 722, in anext
return await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 705, in run_sync_iterator_async
return next(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 866, in gen_wrapper
response = next(iterator)
File "/home/user/app/Gradio_UI.py", line 197, in interact_with_agent
for msg in stream_to_gradio(self.agent, task=prompt, reset_agent_memory=False):
File "/home/user/app/Gradio_UI.py", line 145, in stream_to_gradio
total_input_tokens += agent.model.last_input_token_count
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'

Sign up or log in to comment