Describe the bug
When running:
sample Single Agent
code from https://docs.swarms.world/en/latest/swarms/install/quickstart/
agent.run(
"How can I establish a ROTH ...",
device="cpu",
device_id = 0 // or any variation here
)
terminal output:
python .\my_first_swarm.py
(ProxyActor pid=43904) INFO 2024-11-11 17:41:04,501 proxy 127.0.0.1 proxy.py:1191 - Proxy starting on node 913180a87fc228a16b60f641ccd175289aaa4e2b096ab91c95ab90de (HTTP port: 8000).
2024-11-11T17:41:04.577002-0500 | INFO | Autosaved prompt 29139c5a0d2742d6841edf87c2b0a9e5 to agent_workspace\prompts\prompt-id-29139c5a0d2742d6841edf87c2b0a9e5.json.
2024-11-11T17:41:07.783685-0500 Attempting to run on device: cpu
2024-11-11T17:41:07.784686-0500 Device set to CPU
2024-11-11T17:41:07.785684-0500 Using all available CPU cores: 24
2024-11-11T17:41:07.786685-0500 Available CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
2024-11-11T17:41:07.786685-0500 Error executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].
2024-11-11T17:41:08.786990-0500 Available CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
2024-11-11T17:41:08.787991-0500 Error executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].
2024-11-11T17:41:09.794937-0500 Available CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
2024-11-11T17:41:09.885148-0500 Error executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].
2024-11-11T17:41:09.885148-0500 An error occurred during execution: RetryError[<Future at 0x200aaed3a60 state=finished raised ValueError>]
Traceback (most recent call last):
File "C:\...\miniconda3\envs\swarm\lib\site-packages\tenacity\__init__.py", line 478, in __call__
result = fn(*args, **kwargs)
File "C:\...\miniconda3\envs\swarm\lib\site-packages\clusterops\main.py", line 199, in execute_with_cpu_cores
raise ValueError(
ValueError: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\...\my_first_swarm.py", line 28, in <module>
out = out = agent.run(
File "C:\...\miniconda3\envs\swarm\lib\site-packages\swarms\structs\agent.py", line 2308, in run
raise e
File "C:\...\miniconda3\envs\swarm\lib\site-packages\swarms\structs\agent.py", line 2289, in run
return execute_with_cpu_cores(
File "C:\...\miniconda3\envs\swarm\lib\site-packages\tenacity\__init__.py", line 336, in wrapped_f
return copy(f, *args, **kw)
File "C:\...\miniconda3\envs\swarm\lib\site-packages\tenacity\__init__.py", line 475, in __call__
do = self.iter(retry_state=retry_state)
File "C:\...\miniconda3\envs\swarm\lib\site-packages\tenacity\__init__.py", line 376, in iter
result = action(retry_state)
File "C:\...\miniconda3\envs\swarm\lib\site-packages\tenacity\__init__.py", line 419, in exc_check
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x200aaed3a60 state=finished raised ValueError>]
Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-Break to quit
/prompts/Financial-Analysis-Agent.log
�[32m2024-11-11 18:02:46.362�[0m | �[1mINFO �[0m | �[36mswarms.structs.agent�[0m:�[36mrun�[0m:�[36m2277�[0m - �[1mAttempting to run on device: cpu�[0m
�[32m2024-11-11 18:02:46.365�[0m | �[1mINFO �[0m | �[36mswarms.structs.agent�[0m:�[36mrun�[0m:�[36m2279�[0m - �[1mDevice set to CPU�[0m
�[32m2024-11-11 18:02:46.366�[0m | �[1mINFO �[0m | �[36mswarms.structs.agent�[0m:�[36mrun�[0m:�[36m2282�[0m - �[1mUsing all available CPU cores: 24�[0m
�[32m2024-11-11 18:02:46.366�[0m | �[1mINFO �[0m | �[36mclusterops.main�[0m:�[36mlist_available_cpus�[0m:�[36m51�[0m - �[1mAvailable CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]�[0m
�[32m2024-11-11 18:02:46.366�[0m | �[31m�[1mERROR �[0m | �[36mclusterops.main�[0m:�[36mexecute_with_cpu_cores�[0m:�[36m221�[0m - �[31m�[1mError executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].�[0m
�[32m2024-11-11 18:02:47.382�[0m | �[1mINFO �[0m | �[36mclusterops.main�[0m:�[36mlist_available_cpus�[0m:�[36m51�[0m - �[1mAvailable CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]�[0m
�[32m2024-11-11 18:02:47.382�[0m | �[31m�[1mERROR �[0m | �[36mclusterops.main�[0m:�[36mexecute_with_cpu_cores�[0m:�[36m221�[0m - �[31m�[1mError executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].�[0m
�[32m2024-11-11 18:02:48.393�[0m | �[1mINFO �[0m | �[36mclusterops.main�[0m:�[36mlist_available_cpus�[0m:�[36m51�[0m - �[1mAvailable CPUs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]�[0m
�[32m2024-11-11 18:02:48.393�[0m | �[31m�[1mERROR �[0m | �[36mclusterops.main�[0m:�[36mexecute_with_cpu_cores�[0m:�[36m221�[0m - �[31m�[1mError executing with 24 CPU cores: Invalid core count: 24. Available CPUs are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].�[0m
�[32m2024-11-11 18:02:48.394�[0m | �[31m�[1mERROR �[0m | �[36mswarms.structs.agent�[0m:�[36mrun�[0m:�[36m2307�[0m - �[31m�[1mAn error occurred during execution: RetryError[<Future at 0x23ad1dc7cd0 state=finished raised ValueError>]�[0m
To Reproduce
Steps to reproduce the behavior:
Single Agent
code from https://docs.swarms.world/en/latest/swarms/install/quickstart/VS Code
click "Run" buttonAdditional context
Windows | 11 |
VS Code | latest |
Conda | 24.9.2 |
Python | 3.10.15 |
pip | 24.2 |
swarms | 6.0.9 |
swarms-memory | 0.1.2 |
swarms-models | 0.1.3 |
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too