Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Tool.from_space() missing 2 required positional arguments: 'name' and 'description. #707

Open
touseefahmed96 opened this issue Feb 19, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@touseefahmed96
Copy link
Contributor

Describe the bug
Running smolagent using cli and getting following error: Tool.from_space() missing 2 required positional arguments: 'name' and 'description'

Code to reproduce the error

smolagent "Translate 'Hello World' to French" --tools "Genius-Society/translator:translator:Translate text from English to French" 

Error logs (if any)

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\touse\anaconda3\envs\smolagents\Scripts\smolagent.exe\__main__.py", line 7, in <module>
  File "D:\Convo\smolagents\src\smolagents\cli.py", line 104, in main
    available_tools.append(Tool.from_space(tool_name))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Tool.from_space() missing 2 required positional arguments: 'name' and 'description'

Expected behavior
name and description are required parameters so we have to pass it to Tool.from_space

Packages version:
1.10.0.dev0

@albertvillanova
Copy link
Member

albertvillanova commented Feb 19, 2025

Thanks for reporting. I see no test caught this bug! 😅

If we want to continue using from_space (to support any Space, besides just the pushed Tools), then the required position arguments are needed!

However, was it already decided (or documented) to pass the arguments colon-separated ":"?

@touseefahmed96
Copy link
Contributor Author

@albertvillanova I don't think so that's it is decided yet, I was facing this issue and got this solution, so I added a PR for this. According to you what will be the best approach to send these arguments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants