SkylerLK510/personal-compute-lab

Personal experiments in reliable desktop and Mac compute coordination

Python

0

10 commits

updated Sep 21, 2026

See the code

README

Personal Compute Lab

An early personal experiment in coordinating AI workloads across a persistent desktop and a portable worker. The name is provisional.

The first milestone is a local-only job coordinator, not a distributed GPU engine. It uses Python's standard library and SQLite. GPU inference, training, model sharding, and large checkpoint transfer are not implemented yet.

Current behavior

  • A durable SQLite job queue and HTTP service bound to 127.0.0.1.
  • Workers claim built-in arithmetic test jobs with expiring leases and heartbeats.
  • Unique attempt tokens fence out stale results after reassignment.
  • Repeated identical completion reports are acknowledged without another commit; conflicting reports are rejected.
  • Declared memory reservations prevent over-assignment to a worker identity. This is scheduling metadata, not OS-enforced memory isolation.
  • Small result payloads and their SHA-256 hashes are committed atomically with job state in SQLite.

Execution is at least once: a crash can cause a job to run again. Only the accepted attempt commits its result. Arbitrary side effects would need their own idempotency design.

Run locally

Requires Python 3.11 or newer. No third-party packages are required for this prototype.

In a terminal:

python3 coordinator.py

In another terminal:

python3 worker.py

Submit a test job and inspect state:

python3 -c "from worker import request; print(request('http://127.0.0.1:8765', '/submit', payload={'kind':'square','value':7}))"
python3 -c "from worker import request; print(request('http://127.0.0.1:8765', '/status'))"

On Windows, use the appropriate Python launcher (python or py -3) instead of python3. Coordinator tests pass on GitHub-hosted Windows, Linux, and macOS runners, and on the intended desktop under WSL2. Native Windows on that desktop has not been tested.

Hardware diagnostics

python3 tools/hardware_probe.py --pretty
python3 tools/hardware_probe.py --all --pretty

The default command reports basic hardware and tool availability without launching external commands. --all opts into fixed, read-only NVIDIA, WSL, and macOS queries with per-command timeouts. Individual flags are --nvidia, --wsl, and --macos. Missing tools appear in the JSON report; nothing is installed or uploaded. Review the output before sharing it.

These are inventory facts, not workload benchmarks. NVIDIA's reported CUDA version describes driver support, not an installed toolkit. Thunderbolt speed descriptions are not measured throughput between the two computers. The NVIDIA and macOS queries have been run on the real desktop (inside WSL2) and Mac. The --wsl section only runs from native Windows and still needs validation there.

Tests

python3 -m unittest discover -v

The process test starts a coordinator and worker subprocesses on an ephemeral localhost port, kills a worker and coordinator, restarts the coordinator, verifies job recovery, and rejects stale completion. It uses temporary storage and cleans up its processes. An environment allowing localhost sockets is required.

Limits

This is a trusted-local prototype. It has no authentication or TLS and must not be exposed to a LAN or the Internet. It accepts only one built-in job type, never submitted shell commands. Queue size and HTTP concurrency are not production bounded.

Lease timing uses the coordinator's clock, not worker timestamps. Large coordinator clock jumps, machine sleep, disk-full handling, power-loss durability, and Windows filesystem behavior still need explicit testing. Passing a process-kill test does not prove power-loss safety.

The current SQLite result transaction is not a model checkpoint implementation. Future checkpoints need staged artifacts, size/hash verification, durable completion manifests, and model/optimizer/RNG/data-position consistency.

Planned experiments

  1. Validate local recovery and worker protocol.
  2. Run the same tests on the desktop and measure the actual connection.
  3. Add a native Mac evaluation worker and a desktop training worker with explicit artifact compatibility checks.
  4. Compare independent jobs against desktop-only GPU and CPU-offload baselines.
  5. Investigate distributed inference and, separately, model-partitioned training using public implementations and papers.

Experiments 1 and 2 have been run on the real desktop and Mac; results, the measured link, and the SSH reverse-tunnel pattern that keeps the coordinator on loopback are in docs/two-machine-validation.md.

A coordinator running on the desktop is the intended deployment. Developing the portable coordinator on a Mac does not require relocating the development workstation.

Public research references

These are references, not implemented features or performance claims:

Contributors

SkylerLK510

10 commits

SkylerLK510/personal-compute-lab

Personal experiments in reliable desktop and Mac compute coordination

Python

0

10 commits

updated Sep 21, 2026

See the code

README

Personal Compute Lab

An early personal experiment in coordinating AI workloads across a persistent desktop and a portable worker. The name is provisional.

The first milestone is a local-only job coordinator, not a distributed GPU engine. It uses Python's standard library and SQLite. GPU inference, training, model sharding, and large checkpoint transfer are not implemented yet.

Current behavior

  • A durable SQLite job queue and HTTP service bound to 127.0.0.1.
  • Workers claim built-in arithmetic test jobs with expiring leases and heartbeats.
  • Unique attempt tokens fence out stale results after reassignment.
  • Repeated identical completion reports are acknowledged without another commit; conflicting reports are rejected.
  • Declared memory reservations prevent over-assignment to a worker identity. This is scheduling metadata, not OS-enforced memory isolation.
  • Small result payloads and their SHA-256 hashes are committed atomically with job state in SQLite.

Execution is at least once: a crash can cause a job to run again. Only the accepted attempt commits its result. Arbitrary side effects would need their own idempotency design.

Run locally

Requires Python 3.11 or newer. No third-party packages are required for this prototype.

In a terminal:

python3 coordinator.py

In another terminal:

python3 worker.py

Submit a test job and inspect state:

python3 -c "from worker import request; print(request('http://127.0.0.1:8765', '/submit', payload={'kind':'square','value':7}))"
python3 -c "from worker import request; print(request('http://127.0.0.1:8765', '/status'))"

On Windows, use the appropriate Python launcher (python or py -3) instead of python3. Coordinator tests pass on GitHub-hosted Windows, Linux, and macOS runners, and on the intended desktop under WSL2. Native Windows on that desktop has not been tested.

Hardware diagnostics

python3 tools/hardware_probe.py --pretty
python3 tools/hardware_probe.py --all --pretty

The default command reports basic hardware and tool availability without launching external commands. --all opts into fixed, read-only NVIDIA, WSL, and macOS queries with per-command timeouts. Individual flags are --nvidia, --wsl, and --macos. Missing tools appear in the JSON report; nothing is installed or uploaded. Review the output before sharing it.

These are inventory facts, not workload benchmarks. NVIDIA's reported CUDA version describes driver support, not an installed toolkit. Thunderbolt speed descriptions are not measured throughput between the two computers. The NVIDIA and macOS queries have been run on the real desktop (inside WSL2) and Mac. The --wsl section only runs from native Windows and still needs validation there.

Tests

python3 -m unittest discover -v

The process test starts a coordinator and worker subprocesses on an ephemeral localhost port, kills a worker and coordinator, restarts the coordinator, verifies job recovery, and rejects stale completion. It uses temporary storage and cleans up its processes. An environment allowing localhost sockets is required.

Limits

This is a trusted-local prototype. It has no authentication or TLS and must not be exposed to a LAN or the Internet. It accepts only one built-in job type, never submitted shell commands. Queue size and HTTP concurrency are not production bounded.

Lease timing uses the coordinator's clock, not worker timestamps. Large coordinator clock jumps, machine sleep, disk-full handling, power-loss durability, and Windows filesystem behavior still need explicit testing. Passing a process-kill test does not prove power-loss safety.

The current SQLite result transaction is not a model checkpoint implementation. Future checkpoints need staged artifacts, size/hash verification, durable completion manifests, and model/optimizer/RNG/data-position consistency.

Planned experiments

  1. Validate local recovery and worker protocol.
  2. Run the same tests on the desktop and measure the actual connection.
  3. Add a native Mac evaluation worker and a desktop training worker with explicit artifact compatibility checks.
  4. Compare independent jobs against desktop-only GPU and CPU-offload baselines.
  5. Investigate distributed inference and, separately, model-partitioned training using public implementations and papers.

Experiments 1 and 2 have been run on the real desktop and Mac; results, the measured link, and the SSH reverse-tunnel pattern that keeps the coordinator on loopback are in docs/two-machine-validation.md.

A coordinator running on the desktop is the intended deployment. Developing the portable coordinator on a Mac does not require relocating the development workstation.

Public research references

These are references, not implemented features or performance claims:

Contributors

SkylerLK510

10 commits

Languages

Python

100.0%