Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (155 loc) · 4.57 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (155 loc) · 4.57 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[project]
name = "modelbench"
requires-python = ">=3.12,!=3.12.5,<4"
version = "1.0.0"
description = "Run benchmarks and generate reports measuring the behavior of many AI Systems."
license = "Apache-2.0"
authors = [
{ name = "MLCommons AI Safety", email = "ai-safety-engineering@mlcommons.org" },
]
readme = "README.md"
keywords = [
"AI",
"GenAI",
"LLM",
"NLP",
"evaluate",
"measure",
"quality",
"testing",
"prompt",
"safety",
"compare",
"artificial",
"intelligence",
"Large",
"Language",
"Models",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Benchmark",
"Typing :: Typed",
]
dependencies = [
"jq>=1.6.0,<2.0.0",
"click>=8.3.0,<9.0.0",
"casefy>=1.0.0,<2.0.0",
"termcolor>=2.4,<4.0",
"pip>=24,<27",
"jinja2>=3.1.3,<4.0.0",
"scipy>=1.12.0,<2.0.0",
# Known CVE that doesn't affect us: https://nvd.nist.gov/vuln/detail/CVE-2022-42969
"retry>=0.9.2,<0.10.0",
"tabulate>=0.10.0,<0.11.0",
"zstandard>=0.25.0,<0.26.0",
"tqdm>=4.66.1",
"types-tqdm>=4.66.0.0",
"pydantic>=2.6.0,<3.0.0",
# Known CVE that doesn't apply for our caching use case.
# See https://github.com/piskvorky/sqlitedict/issues/174 for more.
"sqlitedict>=2.1.0,<3.0.0",
"gdown>=5.1.0",
"tomli>=2.0.1,<3.0.0",
"typing-extensions>=4.10.0,<5.0.0",
"tenacity>=9.0.0,<10.0.0",
"jsonlines>=4.0.0,<5.0.0",
"diskcache>=5.6.3,<6.0.0",
"starlette>=0.41",
"fastapi>=0.115",
"together>=1.2.3,<3.0.0",
"anthropic",
"azure-ai-ml>=1.22,<2.0.0",
"google-api-python-client>=2.179.0",
"google-genai>=1.17.0,<3.0.0",
"google-auth>=2.36.0,<3.0.0",
"mistralai>=2.0.0",
"typing-inspect>=0.9.0,<1.0.0",
"boto3>=1.36.25,<2.0.0",
"prometheus-client>=0.23.1,<1.0.0",
"llama-api-client>=0.5,<0.7",
"huggingface-hub>=1.2.3,<2.0.0",
"openai>=2.12.0,<3.0.0",
"pyarrow>=22.0.0,<26.0.0",
"tiktoken>=0.12.0,<1.0.0",
"uvicorn>=0.38,<0.53",
"airrlogger",
"requests-toolbelt>=1.0.0",
"jsonschema>=4.26.0",
"candela-scoring",
]
[project.urls]
Repository = "https://github.com/mlcommons/modelbench"
[project.scripts]
modelbench = "modelbench.cli:cli"
modelgauge = "modelgauge.cli:cli"
[dependency-groups]
dev = [
"pytest-datafiles>=3.0.0,<4.0.0",
"pytest>=9.0.1,<10.0.0",
"pytest-cov>=7.1.0",
"pytest-mock>=3.12.0,<4.0.0",
"pytest-timeout>=2.3.1,<3.0.0",
"mypy>=1.7.1,<3.0.0",
"black>=25.1.0,<27.0.0",
"beautifulsoup4>=4.12.3,<5.0.0",
"flaky>=3.8.1,<4.0.0",
"types-beautifulsoup4>=4.12.0.20240229,<5.0.0",
"httpx>=0.27.2,<0.29.0",
"freezegun>=1.5.5,<2.0.0",
"modelbench[composer]",
]
[project.optional-dependencies]
composer = [
"ipython<10",
"graphviz>=0.20,<1",
"pandas>=2.2.2,<4",
]
[tool.uv]
package = true
[tool.uv.sources]
candela-scoring = { git = "ssh://git@github.com/mlcommons/candela-scoring.git", tag = "v0.3.0" }
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
include = ["modelbench", "modelbench.*", "modelgauge", "modelgauge.*"]
namespaces = true
[tool.setuptools.package-data]
"modelgauge.config_templates" = ["*.toml"]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--ignore=src/modelgauge/",
]
pythonpath = [
"src", "tests", "tests/modelbench_tests", "tests/modelgauge_tests",
]
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
[tool.mypy]
# Using namespace packages to do plugins requires us not to have __init__.py files.
# However, by default mypy uses those to map file paths to modules. This override fixes that.
# https://mypy.readthedocs.io/en/stable/config_file.html#confval-explicit_package_bases
explicit_package_bases = true
mypy_path = "., src, tests"
[[tool.mypy.overrides]]
module = "modelgauge.tests.*,modelgauge.annotators.*,modelgauge.safety_model_response"
ignore_missing_imports = true
[[tool.mypy.overrides]]
# The SUTs, when they were separate plugins, generally weren't written to
# comply; ignoring errors here for now.
module = "modelgauge.suts.*"
ignore_errors = true