-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
92 lines (81 loc) · 3.09 KB
/
Copy pathpyproject.toml
File metadata and controls
92 lines (81 loc) · 3.09 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "steering-bench"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
# torch pinned to match the version vLLM was compiled against.
# Loose specs cause uv run to auto-upgrade and break NCCL ABI.
"torch==2.11.0",
"numpy>=1.26",
"pandas>=2.1",
"matplotlib>=3.8",
"plotly>=5.18",
]
[project.scripts]
steering-bench = "steering_bench.__main__:main"
[project.optional-dependencies]
vllm = ["vllm"]
# The hf_baseline engine loads with device_map="auto", which requires accelerate.
hf = ["transformers>=4.40", "accelerate>=0.30"]
transformerlens = ["transformer-lens>=2.0"]
nnsight = ["nnsight>=0.3"]
# repeng pins numpy<2 which conflicts with vllm (numpy>=2).
# Install repeng in a SEPARATE environment: `uv pip install repeng`
#repeng = ["repeng>=0.3"]
pyvene = ["pyvene>=0.1"]
# Excludes repeng due to numpy version conflict with vllm.
all-external = [
"transformers>=4.40",
"accelerate>=0.30",
"transformer-lens>=2.0",
"nnsight>=0.3",
"pyvene>=0.1",
]
all = ["steering-bench[vllm,all-external]"]
dev = ["pytest>=8.0", "ruff>=0.3", "mypy>=1.8"]
# Worker-side capture/steering consumers used by bench_dynamic_steering.py.
# Worker consumers must be resolvable by name in each worker process, so they
# are advertised through vLLM's entry-point group (instances can't be passed
# for location="worker"). See src/steering_bench/capture_consumers/bench_consumers.py.
[project.entry-points."vllm.capture_consumers"]
bench_capture_async = "steering_bench.capture_consumers.bench_consumers:BenchCaptureAsync"
bench_capture_sync = "steering_bench.capture_consumers.bench_consumers:BenchCaptureSync"
bench_steer_async = "steering_bench.capture_consumers.bench_consumers:BenchSteerAsync"
bench_steer_sync = "steering_bench.capture_consumers.bench_consumers:BenchSteerSync"
bench_steer_dynamic = "steering_bench.capture_consumers.bench_consumers:BenchSteerDynamic"
bench_steer_override = "steering_bench.capture_consumers.bench_consumers:BenchSteerOverride"
bench_steer_rowmon = "steering_bench.capture_consumers.bench_consumers:BenchSteerRowmon"
bench_steer_per_request = "steering_bench.capture_consumers.bench_consumers:BenchSteerPerRequest"
[tool.uv.sources]
# Points to the capture-consumers vLLM fork (feat/capture-consumers branch).
# Steering benchmarks continue to work — the fork includes all upstream changes.
vllm = { path = "/home/nymph/Code/vllm/steering", editable = true }
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
python_version = "3.10"
strict = true
# Optional engine backends are lazily imported and ship no type stubs; don't
# flag their absence as a hard error (they're extras, not core deps).
[[tool.mypy.overrides]]
module = [
"vllm.*",
"transformers.*",
"transformer_lens.*",
"nnsight.*",
"repeng.*",
"pyvene.*",
"openai.*",
"httpx.*",
]
ignore_missing_imports = true