From 329119b716329f3e1cb99f0806ebf50d15286fc6 Mon Sep 17 00:00:00 2001 From: Aymeric Date: Sun, 29 Dec 2024 22:54:28 +0100 Subject: [PATCH] Fix f-string issues on python<3.12 --- README.md | 2 +- pyproject.toml | 9 +++++---- requirements.in | 12 ------------ src/smolagents/__init__.py | 2 +- src/smolagents/agents.py | 2 +- 5 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 requirements.in diff --git a/README.md b/README.md index 8e61d49..e616307 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ limitations under the License. 🌐 **Support for any LLM**: it supports models hosted on the Hub loaded in their `transformers` version or through our inference API, but also models from OpenAI, Anthropic, and many more through our LiteLLM integration. -🧑‍💻 **First-class support for Code Agents**, i.e. agents that write their actions in code (as opposed to "agents being used to write code"), [read more here](tutorials/secure_code_execution). +🧑‍💻 **First-class support for Code Agents**, i.e. agents that write their actions in code (as opposed to "agents being used to write code"), [read more here](https://huggingface.co/docs/smolagents/tutorials/secure_code_execution). 🤗 **Hub integrations**: you can share and load tools to/from the Hub, and more is to come! diff --git a/pyproject.toml b/pyproject.toml index f0dc9dd..4863569 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "smolagents" -version = "0.1.0" +version = "0.1.3" description = "🤗 smolagents: a barebones library for agents. Agents write python code to call tools or orchestrate other agents." authors = [ { name="Aymeric Roucher", email="aymeric@hf.co" }, { name="Thomas Wolf"}, @@ -12,8 +12,10 @@ authors = [ readme = "README.md" requires-python = ">=3.10" dependencies = [ + "torch", + "torchaudio", + "torchvision", "transformers>=4.0.0", - "pytest>=8.1.0", "requests>=2.32.3", "rich>=13.9.4", "pandas>=2.2.3", @@ -24,12 +26,11 @@ dependencies = [ "duckduckgo-search>=6.3.7", "python-dotenv>=1.0.1", "e2b-code-interpreter>=1.0.3", - "torch>=2.5.1", "litellm>=1.55.10", - "torchvision>=0.20.1", ] [project.optional-dependencies] test = [ + "pytest>=8.1.0", "gradio-tools" ] diff --git a/requirements.in b/requirements.in deleted file mode 100644 index 038401b..0000000 --- a/requirements.in +++ /dev/null @@ -1,12 +0,0 @@ -transformers>=4.0.0 -pytest>=8.1.0 -requests>=2.32.3 -rich>=13.9.4 -pandas>=2.2.3 -jinja2>=3.1.4 -pillow>=11.0.0 -markdownify>=0.14.1 -gradio>=5.8.0 -duckduckgo-search>=6.3.7 -python-dotenv>=1.0.1 -ipykernel>=6.29.5 \ No newline at end of file diff --git a/src/smolagents/__init__.py b/src/smolagents/__init__.py index deaf924..a883854 100644 --- a/src/smolagents/__init__.py +++ b/src/smolagents/__init__.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.0" +__version__ = "0.1.3" from typing import TYPE_CHECKING diff --git a/src/smolagents/agents.py b/src/smolagents/agents.py index 0adfa4b..9dbe039 100644 --- a/src/smolagents/agents.py +++ b/src/smolagents/agents.py @@ -473,7 +473,7 @@ You have been provided with these additional arguments, that you can access usin 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 "")}", + subtitle=f"{type(self.model).__name__} - {(self.model.model_id if hasattr(self.model, 'model_id') else '')}", border_style=YELLOW_HEX, subtitle_align="left", )