Skip to main content

A library for distributing computational workloads across multiple devices

Project description

Distributed Compute

A Python library for distributing computational workloads across multiple machines on a local network.

Installation

pip install -e .

Quick Start

Starting the Coordinator

python cli.py coordinator

Starting Workers

On each worker machine:

python start_worker.py <worker-name> <coordinator-ip>

Example:

python start_worker.py laptop-1 192.168.1.100

Running Computations

from distributed_compute import Coordinator

# Connect to coordinator
coordinator = Coordinator(port=5555, verbose=False)

# Define your task
def heavy_computation(x):
    return x ** 2

# Distribute work
results = coordinator.map(heavy_computation, range(100))
print(results)

Or use the provided script:

python run_computation.py

Examples

See the examples/ directory:

  • basic_usage.py - Simple distributed computing
  • ml_inference.py - ML model inference simulation
  • data_processing.py - Data processing pipeline

Features

  • Load balancing across workers
  • Automatic task redistribution on worker failure
  • Real-time monitoring
  • Simple API

Requirements

  • Python 3.7+
  • Network connectivity between machines

License

MIT

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

distributed_compute_locally-0.1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

distributed_compute_locally-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file distributed_compute_locally-0.1.0.tar.gz.

File metadata

File hashes

Hashes for distributed_compute_locally-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c2e569edce1d4bb5cccd879379d71d3374c1e0fa941e39ccde2d4807617e813
MD5 e05c62943b80b06d166189f65b4cc710
BLAKE2b-256 19e842f056d29e13123631190ecf12db570fc1c7ee20d630130a63f23a4f3c53

See more details on using hashes here.

File details

Details for the file distributed_compute_locally-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for distributed_compute_locally-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04e0d84f65cb2a7cfed86626cc298b6cff2ab14687b8fe0e249b92613984bb9e
MD5 45db4ed516ca9bfe7f9387c9345ed643
BLAKE2b-256 5fe2684f8b6aecbd221ea892eafb37d2e48863b15eb44c2667b9f23437298da3

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