Skip to content

Latest commit

 

History

History
123 lines (88 loc) · 4.64 KB

CHANGELOG.md

File metadata and controls

123 lines (88 loc) · 4.64 KB

Changelog

All notable changes to PyLet will be documented in this file.

[0.5.0] - 2026-02-05

Added

  • Instance Deletion: Full deletion support for instances

    • instance.cancel(delete=True) to cancel and delete in one call
    • pylet delete-instance <id> CLI command
    • Removes instance from database entirely
  • Worker Deletion: Delete OFFLINE workers from the cluster

    • pylet delete-worker <id> CLI command
    • Only works for workers in OFFLINE status
  • Graceful Worker Shutdown: Workers now notify head node on shutdown

    • Proper cleanup on Ctrl+C signal
    • Worker exits cleanly without orphaned state
  • Configurable Ports: Instance port range derived from worker HTTP port

    • More flexible port allocation for services

Fixed

  • Worker HTTP port correctly stored and used for log retrieval
  • Worker exits properly on Ctrl+C signal
  • Auto-generated instance name aligned with original behavior

Documentation

  • Architecture Documentation: Comprehensive system architecture docs in docs/architecture.md
    • System overview with ASCII diagrams
    • Instance lifecycle and worker status transitions
    • Core components breakdown (Head Node, Worker Node, Client Libraries)
    • Key design patterns (Long-Poll Heartbeat, Generation-Based Change Detection, Attempt-Based Fencing)
  • Contributing Guidelines: Added CONTRIBUTING.md with development workflow
  • Updated API and CLI reference documentation

Developer Experience

  • Added development tooling: ruff, mypy, pre-commit
  • Applied consistent code formatting with black and ruff
  • Type annotation modernization across codebase

[0.4.0] - 2025-12-26

Added

  • venv parameter: Activate a pre-existing Python virtualenv for instance execution
    • CLI: pylet submit "python train.py" --venv /path/to/venv
    • Python API: pylet.submit("python train.py", venv="/path/to/venv")
    • Solves environment isolation between worker and instances
    • Users are responsible for creating/maintaining venvs on shared filesystem

Technical Details

  • Added venv field to InstanceSubmissionRequest, Instance, and DesiredInstance schemas
  • Worker activates venv via source {venv}/bin/activate && {command}
  • Path validation: must be absolute path, no .. allowed
  • 46 new tests for comprehensive coverage

[0.3.0] - 2024-12-25

Added

  • Advanced GPU Allocation: Storage-aware GPU scheduling for inference instances
    • gpu_indices in instance response (expose physical GPU assignment)
    • target_worker parameter (explicit node placement)
    • gpu_indices in submission (request specific GPUs)
    • exclusive flag (non-exclusive GPU allocation for shared daemons)
    • labels + filtering (custom metadata, e.g., model_id)
    • env parameter in submission (custom environment variables)
    • available_gpu_indices in worker response (which specific GPUs are free)

[0.2.0] - 2024-12-24

Added

  • TOML Configuration File Support: Load settings from pylet.toml or ~/.config/pylet/config.toml

[0.1.0] - 2024-12-22

Initial Release

PyLet is a simple distributed task execution system for GPU servers. Like Ray/K8s but much simpler.

Features

  • Head/Worker Architecture: Distributed system with a head node for coordination and worker nodes for execution
  • GPU-aware Scheduling: Automatic GPU allocation via CUDA_VISIBLE_DEVICES environment variable
  • Service Discovery: Instances receive a PORT environment variable; endpoints discoverable via get-endpoint command
  • Real-time Logs: Stream logs from running instances with pylet logs --follow
  • Graceful Shutdown: SIGTERM with configurable grace period before SIGKILL
  • SQLite Persistence: State survives head node restarts (WAL mode for performance)
  • Long-poll Heartbeats: Efficient worker-controller communication with generation-based protocol
  • Attempt-based Fencing: Correctness guarantees for instance execution

CLI Commands

  • pylet start - Start head node
  • pylet start --head <ip:port> --gpu-units N - Start worker with N GPUs
  • pylet submit <cmd> --gpu-units N --name <name> - Submit instance
  • pylet get-instance --name <name> - Get instance status
  • pylet get-endpoint --name <name> - Get instance endpoint (host:port)
  • pylet logs <id> - View instance logs
  • pylet logs <id> --follow - Follow logs in real-time
  • pylet cancel <id> - Cancel instance
  • pylet list-workers - List registered workers

Python Support

  • Python 3.9, 3.10, 3.11, 3.12, 3.13

Dependencies

  • FastAPI for REST API
  • Pydantic v2 for data validation
  • aiosqlite for async database access
  • httpx for async HTTP client
  • aiohttp for worker HTTP server
  • Click for CLI