Gobal toolbox that allows you to connect, and verify your tools
Project description
Commune: Modular Consensus System
Commune AI provides a powerful framework for building distributed AI applications with modular consensus mechanisms. The system enables seamless integration of AI models, distributed computing, and blockchain technology.
Features
These components can be applied to:
- 🔗 Networks - Create and manage distributed networks with custom consensus mechanisms
- 🤖 AI Models - Deploy and serve AI models in a distributed environment
- 💫 Modules - Build modular components that can be composed into larger systems
- 🔑 Keys - Manage cryptographic keys and identities securely
- 🖥️ Servers - Deploy and monitor distributed services
- ✨ Validation - Implement custom validation rules and scoring mechanisms
Quick Tour
To immediately start using Commune, you can create and serve a module with just a few lines of code:
import commune as c
# Create a simple module
class MyModule(c.Module):
def __init__(self, param1=1):
self.set_config(locals())
def forward(self, x):
return x * self.param1
# Serve the module
module = c.serve('MyModule')
Basic CLI usage:
# Create a new module
>>>c new_module my_module
# Serve a module
>>>c serve my_module
# Call a module function
>>>c call my_module/forward 10
Installation
With pip
pip install commai
From source
git clone https://github.com/commune-ai/commune.git
cd commune
pip install -e .
Development setup
chmod +x ./run/***
sudo ./run/install.sh # Install development environment
Core Components
1. Module System
Modules are the building blocks of Commune applications:
import commune as c
class CustomModule(c.Module):
def __init__(self, config=None):
self.set_config(config)
def process(self, data):
return self.model(data)
2. Network Management
Create and manage distributed networks:
# Start a local network
c.serve('mymodule', network='local')
# Join a subnet
c.serve('mymodule', network='subspace', netuid=0)
3. Validation System
Implement custom validation rules:
class Validator(c.Module):
def validate(self, module):
score = self.evaluate_performance(module)
return score
CLI Reference
Commune provides an intuitive CLI interface:
# Module operations
c new_module <name> # Create new module
c serve <module> # Serve module
c call <module>/<function> # Call module function
c modules # List modules
# Key management
c add_key <name> # Generate new key
c keys # List keys
c sign <message> # Sign message
# Server management
c servers # List servers
c connect <module> # Connect to server
c logs <module> # View logs
Why Commune?
-
Modular Design:
- Build complex systems from simple components
- Easy-to-use module system
- Flexible composition of services
-
Distributed Computing:
- Scale across multiple nodes
- Built-in consensus mechanisms
- Robust networking layer
-
AI Integration:
- Deploy AI models as services
- Distributed training support
- Model validation and scoring
-
Security:
- Built-in key management
- Secure communication
- Validation mechanisms
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
Project details
Release history Release notifications | RSS feed
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 commai-0.0.2.tar.gz.
File metadata
- Download URL: commai-0.0.2.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
704ae395315e9da9f7ef75bca0803a3eae0cbe756c89e27624ce971520f4b5be
|
|
| MD5 |
47dc5444b6f00404d5e4a26a61cbee55
|
|
| BLAKE2b-256 |
4a0950e2da0960bca522806c5187d0b276f9dc279ca71c7eda3d4197aaa9686c
|
File details
Details for the file commai-0.0.2-py3-none-any.whl.
File metadata
- Download URL: commai-0.0.2-py3-none-any.whl
- Upload date:
- Size: 78.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2686ee4b7d49ad492f51b6106f077a775aee3fd85c7eda0f1bd81d953dfbf02f
|
|
| MD5 |
700687933688c589f92b82d265cc2a06
|
|
| BLAKE2b-256 |
6e1d685eea24cf60ee43f04c0af457c86cf47491340da234bfecefd0406dd0f9
|