A lightweight swarm intelligence framework for Python models
Project description
🐝 Swarm Intelligence Framework (V1)
Swarm is a lightweight Python framework designed to orchestrate multiple independent AI agents (or simple scripts) to solve a single problem. It uses Swarm Intelligence principles to aggregate the results of these agents, reducing error and increasing confidence.
We belive in swarm principle so we thought to make it easier for people to use. Train lot of small model and combine the results rather than buildind a large model.
🚀 Key Features
- Parallel Execution: Runs all agents simultaneously using a high-performance thread pool.
- Agnostic Loader: Can load any Python script as an agent dynamically.
- Auto-Strategy: Automatically detects if your agents are returning numbers (Regression) or text/classes (Classification) and applies the correct math.
- Deep Analytics: Returns not just the answer, but the confidence, entropy (confusion), and outlier data. (this is expandable)
🛠️ Usage Guide
I.Setup: Your script should have a function which executes the model and returns the output, then all set.
II.Execution:
1.if the name of the fuction in the script is predict or run, then all good just pass the script's path,
b1 = "model_1/pred.py"
but is anyother name, then you have to pass the function name also and wrap it up in parenthesis,
b2 = ( "model_h52/pred.py", "dano")
2.After that initialize the object like,
swarm = Swarm(b1, b2)
3.Once initialized just call the run function,
results = swarm.run(input, priorities=[0.6, 0.1, 0.1,0.1,0.1], mode="numeric", sensitivity=1.5)
-priorities, sensitivity and mode are all optional.
-mode is automatically detected if doesn't specified.
-if sensitivity value is lower then the outlier filtering will be strict, default value is 1.5.
- there are some sample codes for you, just run
main.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmpython-1.0.1.tar.gz.
File metadata
- Download URL: swarmpython-1.0.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc81ceae2df170b8adc653986a7216c4c01267a1502416c9bb7a59ac210211d
|
|
| MD5 |
cb27dd0f3c4fc8244661ce31c7c967c6
|
|
| BLAKE2b-256 |
4e73b84be153c289a0acd42976c21d910c672e505dd3d4c2ecba4608875ca6e1
|
File details
Details for the file swarmpython-1.0.1-py3-none-any.whl.
File metadata
- Download URL: swarmpython-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e99c3866da8bce2cb9b78d6311b3780ffa799c7825de3b27bc11230edd79906e
|
|
| MD5 |
e496f5dec2ad61ffa82dac8f71c4e4d0
|
|
| BLAKE2b-256 |
f4a5d1de6c4f9ee50291ea7aa0bd58cb5cd05a5988477024074dd3a6eb980603
|