metauto-ai / GPTSwarm

🐝 GPTSwarm: LLM agents as (Optimizable) Graphs
https://gptswarm.org
MIT License
527 stars 25 forks source link

Numpy version issue #26

Closed yl-miao closed 2 months ago

yl-miao commented 3 months ago

Hi,

After testing, the demo_swarm can be run in a newly-created Colab Notebook after pip install gptswarm, but cannot be run in a newly-created Python 3.10 environment by miniconda after pip install gptswarm. Please refer to the pictures:

Pasted Graphic Pasted Graphic 1

I suspect the reason might be: In Colab, although the default version for Python is 3.10, the default version for numpy is 1.25.2. However, in a newly-created conda Python 3.10 environment, during pip install gptswarm, it would install numpy version 2.0.0.

I wondered if this issue can be fixed by adding a restriction for numpy version in the "pyproject.toml" file, or it may be caused by something in the demo code, or by something else, I'm not entirely sure.

Thank you very much!

@Obs01ete

The detailed output (After 'conda create -n tmpenv python=3.10' and 'pip install gptswarm' and the demo_swarm):

Pasted Graphic 2
Obs01ete commented 3 months ago

Hi @yl-miao, thank you for your interest to GPTSwarm! Indeed, some couple of weeks ago, numpy==2.0 had been released and broke outstandingly many builds in the python world. We will consider adding a constraint of numpy<2 in the next version of GPTSwarm release. Meanwhile a hotfix is to manually install pip install numpy==1.25.2 and possibly downgrade versions of packages like seaborn as needed. Please let me know if it solves the issue for you.

Obs01ete commented 3 months ago

@yl-miao you can always install the recent or your own customized version from the cloned repo with poetry install. Please find the instruction in https://github.com/metauto-ai/GPTSwarm/blob/main/DEVELOPMENT.md. You can also try my latest fix at #27.

yl-miao commented 3 months ago

Hi, the #27 fixes this. Thank you very much : ) @Obs01ete