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

Pydantic error - [BUG] + request to clarify README.MD #7

Closed
talpap opened this issue Apr 18, 2024 · 3 comments
Closed

Pydantic error - [BUG] + request to clarify README.MD #7

talpap opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working no-issue-activity

Comments

@talpap
Copy link

talpap commented Apr 18, 2024

Describe the bug
Hi Kye
Saw this repo and got a feeling this is a groundbreaking one. Saw The Medium article first and read it multiple times.
When got to the Repo - didn't realised at first what to do with -no cloning the Repo?

Anyway, nothing worked till I cloned it and afterwards opened in lightning.ai studio - where everything is super pre-set, including env etc.

All the time getting this error:

⚡ main ~/NeoSapiens pip install -U pydantic
Requirement already satisfied: pydantic in /system/conda/miniconda3/envs/cloudspace/lib/python3.10/site-packages (2.6.4)
Collecting pydantic
Downloading pydantic-2.7.0-py3-none-any.whl.metadata (103 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.4/103.4 kB 6.6 MB/s eta 0:00:00
Requirement already satisfied: annotated-types>=0.4.0 in /system/conda/miniconda3/envs/cloudspace/lib/python3.10/site-packages (from pydantic) (0.6.0)
Collecting pydantic-core==2.18.1 (from pydantic)
Downloading pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.5 kB)
Requirement already satisfied: typing-extensions>=4.6.1 in /system/conda/miniconda3/envs/cloudspace/lib/python3.10/site-packages (from pydantic) (4.11.0)
Downloading pydantic-2.7.0-py3-none-any.whl (407 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 407.9/407.9 kB 29.0 MB/s eta 0:00:00
Downloading pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 65.9 MB/s eta 0:00:00
Installing collected packages: pydantic-core, pydantic
Attempting uninstall: pydantic-core
Found existing installation: pydantic_core 2.16.3
Uninstalling pydantic_core-2.16.3:
Successfully uninstalled pydantic_core-2.16.3
Attempting uninstall: pydantic
Found existing installation: pydantic 2.6.4
Uninstalling pydantic-2.6.4:
Successfully uninstalled pydantic-2.6.4
Successfully installed pydantic-2.7.0 pydantic-core-2.18.1
⚡ main ~/NeoSapiens /home/zeus/miniconda3/envs/cloudspace/bin/python /teamspace/studios/this_studio/NeoSapiens/agents1.py
Traceback (most recent call last):
File "/teamspace/studios/this_studio/NeoSapiens/agents1.py", line 2, in
from neo_sapiens import run_swarm
File "/teamspace/studios/this_studio/NeoSapiens/neo_sapiens/init.py", line 8, in
from neo_sapiens.hass_schema import (
File "/teamspace/studios/this_studio/NeoSapiens/neo_sapiens/hass_schema.py", line 8, in
from swarms import Agent, Anthropic, SwarmNetwork, tool
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/init.py", line 18, in
from swarms.swarms import * # noqa: E402, F403
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/swarms/init.py", line 2, in
from swarms.structs.autoscaler import AutoScaler
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/structs/init.py", line 1, in
from swarms.structs.flow import Flow
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/structs/flow.py", line 14, in
from swarms.tools.tool import BaseTool
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/tools/tool.py", line 102, in
class BaseTool(RunnableSerializable[Union[str, Dict], Any]):
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/swarms/tools/tool.py", line 250, in BaseTool
@root_validator()
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/pydantic/deprecated/class_validators.py", line 249, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True. Note that @root_validator is deprecated and should be replaced with @model_validator.

For further information visit https://errors.pydantic.dev/2.7/u/root-validator-pre-skip

I tried - as you suggested on Discord - to install/update Pydantic - it didn't work either.

Please check it out.

To Reproduce
Steps to reproduce the behavior:

  1. Acted as described in README.MD
  2. pip install -U swarms neo-sapiens
  3. Created a file and pasted code there - the code from READSME.MD
  4. Never passed further........
  5. Please clarify what about #TODO - is this something we need to do here? Never got there, so do not understand.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@talpap talpap added the bug Something isn't working label Apr 18, 2024
Copy link

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

@EthanQuarry
Copy link

Found this issue aswell.

Copy link

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

3 participants