Skip to main content

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.

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

swarmpython-1.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmpython-1.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file swarmpython-1.0.2.tar.gz.

File metadata

  • Download URL: swarmpython-1.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for swarmpython-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b2d16b8f92d886d14acbf33ba70a2497c14ff2f37ea955a07ebf481c5e12fdcb
MD5 35a8a0ac4c7dd27527e0bdd0a7d63a69
BLAKE2b-256 8f31822c98ed9113910a417b2557ddca51387c04db9cb1bb3dedc2008e7a103b

See more details on using hashes here.

File details

Details for the file swarmpython-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: swarmpython-1.0.2-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

Hashes for swarmpython-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e35bb5c671aebdb21355497044e0e54e0ffdd061f72d5be88faa4617984ecb63
MD5 fbb9ce36b06b5e6ccec08a49cbec6304
BLAKE2b-256 84473798e178771d592d22aa4fd4a591be7783651ff92b26d6b988196068fb5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page