Implementation:Allenai Open instruct Project Configuration
| Knowledge Sources | |
|---|---|
| Domains | Build_System, Dependencies |
| Last Updated | 2026-02-07 02:00 GMT |
Overview
Python project configuration file defining the open-instruct package metadata, dependencies, build system, and development tooling.
Description
The pyproject.toml is the single source of truth for the open-instruct project configuration. It defines the package as open-instruct v0.1.0 requiring Python 3.12. Core dependencies include PyTorch (>=2.9.0), Transformers (>=4.57.0), vLLM (0.14.1), Ray, Accelerate, DeepSpeed, and OLMo-core. The file configures UV package manager settings with platform-specific PyTorch index sources for CUDA support, Ruff linting rules (F, E, W, I, SIM, UP, B), pytest options, and Black-compatible formatting with 119-character line length. Optional dependency groups include code (pydantic, requests) and dr-tulu (dr_agent).
Usage
This file is consumed by the UV package manager, pip, and development tools (ruff, pytest, black). It is essential for reproducible builds and consistent development environments.
Code Reference
Source Location
- Repository: Allenai_Open_instruct
- File: pyproject.toml
- Lines: 1-193
Signature
[project]
name = "open-instruct"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = [
"accelerate>=1.10.1",
"deepspeed>=0.18.3",
"torch>=2.9.0,<2.10",
"transformers>=4.57.0",
"vllm==0.14.1",
"ray[default]>=2.49.2",
"olmo-core==2.3.0",
# ... additional dependencies
]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.backends._legacy:_Backend"
[tool.ruff.lint]
select = ["F", "E", "W", "I", "SIM", "UP", "B", "PLC0415"]
[tool.ruff.format]
quote-style = "double"
Import
# Install the project:
uv sync
# Or with pip:
pip install -e .
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| pyproject.toml | TOML file | Yes | Read by UV, pip, ruff, pytest, and other tools |
Outputs
| Name | Type | Description |
|---|---|---|
| Installed package | Python package | open-instruct with all dependencies resolved |
| Tool configs | Settings | Ruff, pytest, Black, and ty configurations |
Usage Examples
Installing the Project
# Install with UV (recommended):
uv sync
# Install with pip:
pip install -e .
# Install with optional code dependencies:
pip install -e ".[code]"
Running Development Tools
# Lint and format (configured in pyproject.toml):
make style && make quality
# Run tests:
uv run pytest