Codeseys/composer-replication-framework
0
1[build-system]2requires = ["hatchling>=1.21"]3build-backend = "hatchling.build"4 5[project]6name = "composer-replication"7version = "0.1.0"8description = "Open replication framework for Cursor Composer 2.5: GRPO + SDPO + multi-teacher trace-replay DPO with optional DiLoCo outer loop."9readme = "README.md"10license = { file = "LICENSE" }11authors = [12 { name = "Codeseys", email = "bbaladithyab@gmail.com" }13]14keywords = [15 "rl-training",16 "rlvr",17 "grpo",18 "sdpo",19 "simpo",20 "taid",21 "dpo",22 "diloco",23 "decoupled-diloco",24 "agentic",25 "coding-agents",26 "composer-2-5",27 "cursor",28 "trl",29 "verl",30 "prime-rl",31 "openenv",32 "torchft",33 "modal",34 "huggingface-jobs",35]36classifiers = [37 "Development Status :: 3 - Alpha",38 "Intended Audience :: Science/Research",39 "License :: OSI Approved :: MIT License",40 "Programming Language :: Python :: 3.10",41 "Programming Language :: Python :: 3.11",42 "Programming Language :: Python :: 3.12",43 "Topic :: Scientific/Engineering :: Artificial Intelligence",44]45requires-python = ">=3.10"46dependencies = [47 "torch>=2.0",48 "transformers>=4.46",49]50 51[project.optional-dependencies]52# Real teacher-replay over OpenRouter53replay = [54 "httpx>=0.27",55]56# DiLoCo outer-loop optimizer (single-process)57diloco = [58 "torchft-nightly",59]60# Decoupled DiLoCo over serverless executors (per ADR-005)61# fsspec gives the object-store rendezvous one code path (s3://, gs://, hf://,62# file://); s3fs is the concrete S3 backend (the AWS default per the EKS design);63# boto3 + kubernetes are needed by the AWS leaf adapters (SageMakerExecutor uses64# boto3.create_training_job; EKSExecutor uses the kubernetes BatchV1 client).65serverless = [66 "fsspec>=2024.6",67 "huggingface_hub>=0.27", # for hf:// fsspec backend + HF Jobs68 "s3fs>=2024.6", # concrete S3 backend for ObjectStoreAllReduce (AWS default)69 "boto3>=1.34", # SageMakerExecutor (create_training_job) + S3 IAM70 "kubernetes>=29.0", # EKSExecutor (indexed k8s Jobs via BatchV1Api)71]72# Amazon EKS / Kubernetes Indexed-Job executor (EKSExecutor, per ADR-005).73# kubernetes is lazy-imported at adapter-init/method time (not at package import).74eks = [75 "kubernetes>=29",76]77# Amazon SageMaker training-job executor (SageMakerExecutor, per ADR-005).78# boto3: the executor uses raw create_training_job. sagemaker (<3): the v279# Estimator API the GSM8K smoke launcher (examples/gsm8k_grpo/80# run_sagemaker_launch.py) uses — pinned <3 because SDK v3 is an API rewrite81# that dropped sagemaker.estimator.Estimator (F3 §1, verified live 2026-06-09).82aws = [83 "boto3>=1.34",84 "sagemaker>=2.200,<3",85]86# SWE-smith task-synthesis engine (deepread finding V4 buy-vs-build verdict):87# the swesmith toolkit builds env images from arbitrary GitHub repos and88# synthesizes bugs (PR Mirror = this repo's gold-patch-reversion mechanic).89# LIVE synthesis needs Docker on Linux (the toolkit does not support macOS/90# Windows officially); the SwesmithAdapter itself needs nothing beyond core.91swesmith = [92 "swesmith>=0.1",93]94# Replaysim dataset normalization (per ADR-004)95#96# NOTE: data-juicer is intentionally NOT pinned as an extra. The package97# named "data-juicer" does not exist on PyPI (the closest match,98# "py-data-juicer==1.0.0", has broken transitive deps; later py-data-juicer99# releases work but install ~150 transitive packages). Users who want the100# DJNormalizer adapter should install data-juicer from source themselves —101# see docs/TROUBLESHOOTING.md ("monarch / data-juicer install"). The102# replaysim Python module imports data_juicer lazily, so the framework103# package imports cleanly without it; only DJNormalizer use-time fails.104replaysim = [105 "composer-replication[replay]", # replaysim builds on the replay channel106]107# Production training (TRL GRPOTrainer subclass — Recipe A)108train = [109 "trl>=0.12",110 "peft>=0.13",111 "accelerate>=1.0",112 "datasets>=3.0",113]114# Feature-Deletion synthetic-data generation (ADR-010)115# Inverts OSS SWE substrates into reimplement-to-pass tasks. `datasets` loads116# the substrate instances; `docker` runs tests in the substrate's frozen image.117# Pure-Python core (schema/env/monitor/curriculum/validator/substrate-adapter)118# needs only `datasets`; `docker` is for the real LocalSubprocessSandbox /119# substrate-inversion path.120datagen = [121 "datasets>=3.0",122 "docker>=7.0",123]124# PRIME-RL recipe (Recipe C — per ADR-006)125# NOTE: a `prime-rl` extra used to be advertised here pinning126# `prime-rl>=0.5`. That pin is unsatisfiable: the `prime-rl` PyPI name is127# not registered. Prime Intellect publishes prime-rl from source only128# (https://github.com/PrimeIntellect-ai/prime-rl). The framework's129# composer_replication.recipes.prime_rl adapter handles its absence130# gracefully (the upstream parity test is skip-marked when prime-rl is131# not importable) and the in-file shadow-parity test still verifies the132# loss formula independently. The extra is dropped — see133# docs/TROUBLESHOOTING.md ("prime-rl install") for installation guidance.134# NOTE: a `monarch` extra used to be advertised here pinning135# `monarch>=0.4.1`. That pin is unsatisfiable: PyPI's `monarch` package136# is unrelated to Meta's actor framework and tops out at 0.1.11. The real137# Meta Monarch is published as `torchmonarch-nightly` and ships only as138# nightly wheels with platform constraints. Per ADR-006, full Monarch139# integration is a v0.2+ bet and the `composer_replication.recipes.monarch`140# module is a documentation skeleton (importing it does NOT require141# monarch installed). The extra is dropped — see docs/TROUBLESHOOTING.md142# ("monarch / data-juicer install") for installation guidance.143# Development — the BASE dev set installs on every platform (macOS arm64 incl.).144# NOTE: `diloco` (torchft-nightly) is deliberately NOT in base `dev`: torchft-nightly145# ships Linux-x86_64 wheels only, so including it made `pip install -e '.[dev]'` fail146# outright on Apple Silicon / any non-Linux-x86_64 host. The torchft-dependent tests147# skipif-gate cleanly when it is absent, so the base dev set runs the full suite minus148# the torchft integration tests on any platform.149dev = [150 "pytest>=8.0",151 "ruff>=0.6",152 "composer-replication[replay,train]",153]154# Full development incl. the DiLoCo outer-loop dep (Linux-x86_64 only — torchft-nightly).155# Use on a Linux GPU/CI host to also exercise the torchft integration tests.156dev-full = [157 "composer-replication[dev,diloco,serverless,datagen]",158]159 160[project.urls]161Homepage = "https://huggingface.co/Codeseys/composer-replication-framework"162Documentation = "https://huggingface.co/Codeseys/composer-replication-framework/blob/main/docs/INTEGRATION_ARCHITECTURE.md"163Repository = "https://huggingface.co/Codeseys/composer-replication-framework"164Issues = "https://huggingface.co/Codeseys/composer-replication-framework/discussions"165 166[tool.hatch.build.targets.wheel]167packages = ["composer_replication"]168 169[tool.hatch.build.targets.sdist]170include = [171 "/composer_replication",172 "/README.md",173 "/LICENSE",174 "/CITATION.cff",175 "/CITATION.bib",176]177 178[tool.ruff]179line-length = 100180target-version = "py310"181 182[tool.ruff.lint]183select = ["E", "F", "W", "I", "N", "UP", "B"]184ignore = ["E501", "E741"]185 