-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (128 loc) · 3.99 KB
/
Copy pathpyproject.toml
File metadata and controls
135 lines (128 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[project]
name = "open-ctf-env"
version = "0.4.0"
description = "Open-source CTF training environment: TRL SFT + SkyRL GRPO + GEPA"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
authors = [
{name = "Open CTF Team"},
]
# Core dependencies — only what the CLI, data tools, reward, formatters,
# and ToolExecutor need at the top level.
# Heavy ML deps (transformers, torch, etc.) live in optional extras.
dependencies = [
"pyyaml",
"pydantic>=2.0.0",
"jsonlines",
]
[project.optional-dependencies]
# LoRA merge + GGUF export (open-ctf-train merge, open-ctf-export)
# Qwen3.5-27B requires transformers>=5.2.0 for Qwen3_5ForConditionalGeneration.
merge = [
"torch>=2.5.0",
"transformers>=5.2.0",
"peft>=0.15.0",
"accelerate>=1.4.0",
]
# Stage 1: TRL SFT
sft = [
"trl>=0.28.0",
"torch>=2.5.0",
"transformers>=5.2.0",
"peft>=0.15.0",
"accelerate>=1.4.0",
"datasets>=3.0.0",
"bitsandbytes>=0.45.0",
"wandb",
]
# Stage 2: SkyRL GRPO (online RL)
# NOTE: skyrl-train is NOT on PyPI. Install from source:
# pip install git+https://github.com/SkyRL-Team/SkyRL-Train.git
# Qwen3.5-27B requires transformers>=5.2.0, accelerate>=1.4.0 (FSDP2).
# Failure mode to avoid: having only flash_attn installed is not enough for
# Qwen3.5 hybrid linear-attention blocks. Missing `fla`/`causal_conv1d`
# triggers torch fallback kernels (`torch_chunk_gated_delta_rule`) that have
# caused illegal memory access crashes in online GRPO.
grpo = [
"skyrl-gym>=0.1.0",
"ray[default]>=2.40.0",
"torch>=2.5.0",
"transformers>=5.2.0",
# Required by transformers loss import path (object-detection loss module
# imports scipy.optimize.linear_sum_assignment at import time).
"scipy>=1.16.0",
# Qwen3.5 linear-attention fast path dependencies (module imports: fla, causal_conv1d)
# Pin known-good versions for SkyRL GRPO on CUDA 12.x hosts.
"flash-linear-attention==0.4.1; sys_platform == 'linux'",
"causal-conv1d==1.6.0; sys_platform == 'linux'",
"peft>=0.15.0",
"accelerate>=1.4.0",
"omegaconf",
"hydra-core",
"wandb",
"jmespath",
]
# Stage 2 alias: semantic name for online reinforcement learning.
# Kept alongside `grpo` for backward compatibility with existing setups.
online-rl = [
"skyrl-gym>=0.1.0",
"ray[default]>=2.40.0",
"torch>=2.5.0",
"transformers>=5.2.0",
"scipy>=1.16.0",
"flash-linear-attention==0.4.1; sys_platform == 'linux'",
"causal-conv1d==1.6.0; sys_platform == 'linux'",
"peft>=0.15.0",
"accelerate>=1.4.0",
"omegaconf",
"hydra-core",
"wandb",
"jmespath",
]
# Stage 3: GEPA prompt evolution
gepa = [
"dspy>=3.1.0",
"gepa>=0.0.26",
]
# Agent runner (wraps BoxPwnr)
agent = [
"litellm",
]
# Development and testing
dev = [
"pytest",
"ruff",
]
[project.scripts]
open-ctf-train = "open_ctf.cli.train:main"
open-ctf-convert = "open_ctf.cli.convert_traces:main"
open-ctf-split = "open_ctf.cli.split_dataset:main"
open-ctf-agent = "open_ctf.cli.run_agent:main"
open-ctf-eval = "open_ctf.cli.evaluate:main"
open-ctf-validate = "open_ctf.cli.validate_pipeline:main"
open-ctf-export = "open_ctf.cli.export_gguf:main"
open-ctf-challenges = "open_ctf.cli.challenges:main"
open-ctf-synthetic-data = "open_ctf.cli.synthetic_data_generation:main"
open-ctf-trajectories = "open_ctf.cli.trajectories:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/open_ctf"]
[tool.uv]
dev-dependencies = [
"pytest",
"ruff",
]
# Keep Qwen3.5 linear-attention deps at known-good minimums for Linux GRPO
# envs, so fresh resolves don't silently downgrade below crash-fixed baseline.
constraint-dependencies = [
"flash-linear-attention==0.4.1; sys_platform == 'linux'",
"causal-conv1d==1.6.0; sys_platform == 'linux'",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
pythonpath = ["src"]
norecursedirs = ["references", "benchmarks", "outputs", ".venv", "venv"]