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] 0.1.2 f-string issue #4

Open
junzheng-wu-whitehorse opened this issue Dec 27, 2024 · 1 comment
Open

[bug] 0.1.2 f-string issue #4

junzheng-wu-whitehorse opened this issue Dec 27, 2024 · 1 comment

Comments

@junzheng-wu-whitehorse
Copy link

  • version 0.1.2 will crash on a simple import as from smolagents import CodeAgent.
  • The error log is:
  File "/opt/conda/envs/chat/lib/python3.11/site-packages/smolagents/agents.py", line 476
    subtitle=f"{type(self.model).__name__} - {(self.model.model_id if hasattr(self.model, "model_id") else "")}",
  • Seems like like 476 has a double quote in the f-string:
        console.print(
            Panel(
                f"\n[bold]{self.task.strip()}\n",
                title="[bold]New run",
                subtitle=f"{type(self.model).__name__} - {(self.model.model_id if hasattr(self.model, "model_id") else "")}",
                border_style=YELLOW_HEX,
                subtitle_align="left",
            )
        )

Should be replaced as:

subtitle=f"{type(self.model).__name__} - {(self.model.model_id if hasattr(self.model, 'model_id') else '')}",
@daviden1013
Copy link

0.1.0 has the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants