[build-system] requires = ["hatchling>=1.21"] build-backend = "hatchling.build" [project] name = "composer-replication" version = "0.1.0" description = "Open replication framework for Cursor Composer 2.5: GRPO + SDPO + multi-teacher trace-replay DPO with optional DiLoCo outer loop." readme = "README.md" license = { file = "LICENSE" } authors = [ { name = "Codeseys", email = "bbaladithyab@gmail.com" } ] keywords = [ "rl-training", "rlvr", "grpo", "sdpo", "simpo", "taid", "dpo", "diloco", "decoupled-diloco", "agentic", "coding-agents", "composer-2-5", "cursor", "trl", "verl", "prime-rl", "openenv", "torchft", "modal", "huggingface-jobs", ] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", ] requires-python = ">=3.10" dependencies = [ "torch>=2.0", "transformers>=4.46", ] [project.optional-dependencies] # Real teacher-replay over OpenRouter replay = [ "httpx>=0.27", ] # DiLoCo outer-loop optimizer (single-process) diloco = [ "torchft-nightly", ] # Decoupled DiLoCo over serverless executors (per ADR-005) serverless = [ "fsspec>=2024.6", "huggingface_hub>=0.27", # for hf:// fsspec backend + HF Jobs ] # Replaysim dataset normalization (per ADR-004) # # NOTE: data-juicer is intentionally NOT pinned as an extra. The package # named "data-juicer" does not exist on PyPI (the closest match, # "py-data-juicer==1.0.0", has broken transitive deps; later py-data-juicer # releases work but install ~150 transitive packages). Users who want the # DJNormalizer adapter should install data-juicer from source themselves — # see docs/TROUBLESHOOTING.md ("monarch / data-juicer install"). The # replaysim Python module imports data_juicer lazily, so the framework # package imports cleanly without it; only DJNormalizer use-time fails. replaysim = [ "composer-replication[replay]", # replaysim builds on the replay channel ] # Production training (TRL GRPOTrainer subclass — Recipe A) train = [ "trl>=0.12", "peft>=0.13", "accelerate>=1.0", "datasets>=3.0", ] # PRIME-RL recipe (Recipe C — per ADR-006) # NOTE: a `prime-rl` extra used to be advertised here pinning # `prime-rl>=0.5`. That pin is unsatisfiable: the `prime-rl` PyPI name is # not registered. Prime Intellect publishes prime-rl from source only # (https://github.com/PrimeIntellect-ai/prime-rl). The framework's # composer_replication.recipes.prime_rl adapter handles its absence # gracefully (the upstream parity test is skip-marked when prime-rl is # not importable) and the in-file shadow-parity test still verifies the # loss formula independently. The extra is dropped — see # docs/TROUBLESHOOTING.md ("prime-rl install") for installation guidance. # NOTE: a `monarch` extra used to be advertised here pinning # `monarch>=0.4.1`. That pin is unsatisfiable: PyPI's `monarch` package # is unrelated to Meta's actor framework and tops out at 0.1.11. The real # Meta Monarch is published as `torchmonarch-nightly` and ships only as # nightly wheels with platform constraints. Per ADR-006, full Monarch # integration is a v0.2+ bet and the `composer_replication.recipes.monarch` # module is a documentation skeleton (importing it does NOT require # monarch installed). The extra is dropped — see docs/TROUBLESHOOTING.md # ("monarch / data-juicer install") for installation guidance. # Everything for development dev = [ "pytest>=8.0", "ruff>=0.6", "composer-replication[replay,diloco,train]", ] [project.urls] Homepage = "https://huggingface.co/Codeseys/composer-replication-framework" Documentation = "https://huggingface.co/Codeseys/composer-replication-framework/blob/main/docs/INTEGRATION_ARCHITECTURE.md" Repository = "https://huggingface.co/Codeseys/composer-replication-framework" Issues = "https://huggingface.co/Codeseys/composer-replication-framework/discussions" [tool.hatch.build.targets.wheel] packages = ["composer_replication"] [tool.hatch.build.targets.sdist] include = [ "/composer_replication", "/README.md", "/LICENSE", "/CITATION.cff", "/CITATION.bib", ] [tool.ruff] line-length = 100 target-version = "py310" [tool.ruff.lint] select = ["E", "F", "W", "I", "N", "UP", "B"] ignore = ["E501", "E741"]