Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Huggingface Open r1 Setup Py Install

From Leeroopedia


Field Value
Sources Repo (https://github.com/huggingface/open-r1)
Domains Infrastructure, DevOps
Last Updated 2026-02-08 00:00 GMT

Overview

External tool documentation for installing the Open-R1 package and its dependencies via setup.py with configurable extras.

Description

This is an External Tool Doc. The setup.py file defines the open-r1 package with setuptools. Key pinned dependencies:

  • accelerate==1.4.0
  • datasets>=3.2.0
  • deepspeed==0.16.8
  • transformers==4.52.3
  • trl[vllm]==0.18.0
  • torch==2.6.0
  • liger-kernel>=0.5.10
  • wandb>=0.19.1

Extras:

  • "quality"ruff, isort
  • "tests"pytest, parameterized
  • "eval"lighteval, math-verify, latex2sympy2_extended
  • "code"e2b-code-interpreter, python-dotenv, morphcloud, jieba, pandas, aiofiles
  • "dev" — all extras combined

Requires Python >=3.10.9.

Usage

Run as the first step of any Open-R1 workflow to install the package and its dependencies.

Code Reference

Source

Repository File Lines Description
open-r1 setup.py L1-150 Package definition with base and extras dependencies

Signature

# Full development install:
pip install -e '.[dev]'

# Minimal install for SFT:
pip install -e .

# With code execution providers:
pip install -e '.[code]'

# With evaluation tools:
pip install -e '.[eval]'

Import

N/A (external tool, not a Python import)

I/O Contract

Inputs

Input Type Description
Python environment >=3.10.9 A Python interpreter meeting the minimum version requirement
Repository clone filesystem path Local clone of the open-r1 repository
Extras selection optional CLI argument One or more extras names (e.g., dev, eval, code) to install additional dependency groups

Outputs

Output Type Description
Installed package Python package The open-r1 package installed in editable mode with all selected dependencies available in the environment

Usage Examples

Full development setup:

# Clone the repository and install with all extras
git clone https://github.com/huggingface/open-r1.git
cd open-r1
pip install -e '.[dev]'

Evaluation-only setup:

# Install with only evaluation dependencies
pip install -e '.[eval]'

Code execution setup:

# Install with code execution provider dependencies
pip install -e '.[code]'

These commands install the open-r1 package in editable mode. The extras flag selects which optional dependency groups to include alongside the base dependencies.

Related Pages

Principle:Huggingface_Open_r1_Environment_Setup

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment