Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
147 lines (138 loc) · 3.7 KB
/
Copy pathpyproject.toml
File metadata and controls
147 lines (138 loc) · 3.7 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
136
137
138
139
140
141
142
143
144
145
146
147
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "lexverse"
version = "1.0"
description = "Task-oriented legal benchmark runtime for legal agents"
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
"pydantic>=2.0.0",
"pyyaml>=6.0",
"filelock>=3.0",
]
[project.optional-dependencies]
# Model backends.
openai = [
"openai>=1.0",
]
local-transformers = [
"openai>=1.0",
"torch>=2.2",
# Shared generation API for original Qwen remote code and native Qwen3.
"transformers==4.51.3",
"einops>=0.8,<0.9",
"transformers-stream-generator==0.0.5",
"tiktoken>=0.5.2",
"sentencepiece==0.2.0",
"protobuf",
"accelerate",
"huggingface_hub>=0.25",
]
# vLLM 0.11.x keeps Transformers 4.x compatibility with the LawBench/LTP stack.
# Install on hardware supported by vLLM; the default Mac smoke uses Transformers/MPS.
local-vllm = [
"openai>=1.0",
"vllm>=0.11,<0.12",
"huggingface_hub>=0.25",
]
# Benchmarks.
dlawbench = [
"openai>=1.0",
]
j1bench = [
"openai>=1.0",
"huggingface_hub>=0.25",
"jsonlines>=3.0",
"requests>=2.0",
"tqdm>=4.0",
"numpy>=1.20,<2",
]
# rouge and rouge_chinese share an import path; combined installs may change Rouge scores.
lawbench = [
"rouge_chinese>=1.0",
"cn2an>=0.5",
"jieba>=0.42",
"numpy>=1.20,<2",
"nltk>=3.6",
"pandas>=1.3",
"opencc-python-reimplemented>=0.1.7",
"timeout-decorator>=0.5",
"tqdm>=4.0",
"pypinyin>=0.49",
"python-Levenshtein>=0.20",
"ltp>=4.2",
"torch>=2.0",
# The supported LTP stack requires Transformers 4.x.
"transformers>=4.0,<5",
]
legalworld = [
"huggingface_hub>=0.25",
"camel-ai==0.2.90",
# CAMEL 0.2.90 imports FastMCP from mcp.server (removed in MCP 2.x).
"mcp>=1.3.0,<2",
"python-dotenv>=1.0.1",
"docxtpl>=0.16.7",
"python-docx>=1.1.0",
"reportlab>=4.2.0",
"numpy>=1.26",
]
lexeval = [
"jsonlines>=3.0",
"jieba>=0.42",
"rouge>=1.0",
# Upstream evaluators require NumPy 1.x compatibility.
"numpy>=1.20,<2",
]
plawbench = [
"openai>=1.0",
"json-repair>=0.30",
]
# SimuCourt, MASER and LeCaRDv2 benchmark dependencies.
simucourt = [
"openai>=1.0",
]
maser = [
"openai>=1.0",
"numpy>=1.24",
"tqdm>=4.66",
"jsonlines>=4.0",
]
lecardv2 = [
"openai>=1.0",
"jieba>=0.42",
"numpy>=1.20",
"pytrec-eval-terrier>=0.5.6",
]
# Development and testing.
test = [
"pytest>=7.0",
"pytest-asyncio>=0.23",
]
[project.scripts]
lexverse = "lexverse.cli:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["lexverse", "lexverse.*"]
exclude = ["reference_harness*", "tests*", "data*", "docs*"]
[tool.setuptools.package-data]
"lexverse.benchmarks.dlawbench" = ["catalog.yaml"]
"lexverse.benchmarks.j1bench" = ["patches/*.patch", "catalog.yaml"]
"lexverse.benchmarks.lawbench" = ["patches/*.patch", "catalog.yaml"]
"lexverse.benchmarks.legalworld" = ["catalog.yaml", "patches/*.patch"]
"lexverse.benchmarks.lexeval" = ["patches/*.patch", "catalog.yaml"]
"lexverse.benchmarks.plawbench" = ["patches/*.patch", "catalog.yaml"]
"lexverse.benchmarks.simucourt" = ["catalog.yaml", "patches/*.patch"]
"lexverse.benchmarks.maser" = ["catalog.yaml", "patches/*.patch"]
"lexverse.benchmarks.lecardv2" = ["catalog.yaml"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
"integration: needs upstream cache and/or network (offline-runnable once cached)",
"live_api: calls a real paid model API; excluded by default",
"local_hardware: real local backend requiring suitable hardware and cached weights",
]
# Exclude live API tests by default.
addopts = "-m 'not live_api'"