-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
158 lines (146 loc) · 5.39 KB
/
pyproject.toml
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
[project]
name = "modelbench"
requires-python = ">=3.10, !=3.12.5, <3.13"
[tool.poetry]
name = "modelbench"
version = "0.6.1"
description = "Run benchmarks and generate reports measuring the behavior of many AI Systems."
license = "Apache-2.0"
authors = ["MLCommons AI Safety <ai-safety-engineering@mlcommons.org>"]
readme = "README.md"
repository = "https://github.com/mlcommons/modelbench"
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",
]
packages = [
{ include = "modelbench", from = "src" },
{ include = "modelgauge", from = "src" }
]
[tool.poetry.dependencies]
python = ">=3.10,!=3.12.5,<3.13"
jq = "^1.6.0"
click = "^8.1.7"
casefy = "^1.0.0"
termcolor = "^2.4.0"
pip = "^24.0"
jinja2 = "^3.1.3"
scipy = "^1.12.0"
retry = "^0.9.2"
tabulate = "^0.9.0"
zstandard = { extras = ["cffi"], version = "^0.23.0" }
tqdm = ">=4.66.1"
types-tqdm = "^4.66.0.0"
pydantic = "^2.6.0"
sqlitedict = "^2.1.0"
gdown = ">=5.1.0"
tomli = "^2.0.1"
typing-extensions = "^4.10.0"
tenacity = "^9.0.0"
jsonlines = "^4.0.0"
diskcache = "^5.6.3"
starlette = ">=0.41,<0.42"
fastapi = "^0.115.0"
together = "^1.2.3"
modelgauge_anthropic = {version = "*", optional = true}
modelgauge_azure = {version = "*", optional = true}
modelgauge_demo_plugin = {version = "*", optional = false}
modelgauge_nvidia = {version = "*", optional = true}
modelgauge_standard_tests = {version = "*", optional = true}
modelgauge_openai = {version = "*", optional = true}
modelgauge_huggingface = {version = "*", optional = true}
modelgauge_perspective_api = {version = "*", optional = true}
modelgauge_google = {version = "*", optional = true}
modelgauge_vertexai = {version = "*", optional = true}
modelgauge_mistral = {version = "*", optional = true}
[tool.poetry.group.dev.dependencies]
modelgauge_anthropic = {path = "plugins/anthropic", develop = true, optional=true}
modelgauge_azure = {path = "plugins/azure", develop = true, optional=true}
modelgauge_demo_plugin = {path = "demo_plugin", develop = true, optional=false}
modelgauge_nvidia = {path = "plugins/nvidia", develop = true, optional=true}
modelgauge_standard_tests = {path = "plugins/standard_tests", develop = true, optional=true}
modelgauge_openai = {path = "plugins/openai", develop = true, optional=true}
modelgauge_huggingface = {path = "plugins/huggingface", develop = true, optional=true}
modelgauge_perspective_api = {path = "plugins/perspective_api", develop = true, optional=true}
modelgauge_google = {path = "plugins/google", develop = true, optional=true}
modelgauge_vertexai = {path = "plugins/vertexai", develop = true, optional = true}
# named *mistral* rather than *mistralai* to prevent a conflict with the first-party mistralai package
modelgauge_mistral = {path = "plugins/mistral", develop = true, optional = true}
pytest-datafiles = "^3.0.0"
pytest = "^8.0.1"
pytest-mock = "^3.12.0"
pytest-timeout = "^2.3.1"
mypy = "^1.7.1"
black = "^24.3.0"
beautifulsoup4 = "^4.12.3"
flaky = "^3.8.1"
types-beautifulsoup4 = "^4.12.0.20240229"
httpx = "^0.27.2"
[tool.poetry.extras]
anthropic = ["modelgauge_anthropic"]
azure = ["modelgauge_azure"]
demo = ["modelgauge_demo_plugin"]
nvidia = ["modelgauge_nvidia"]
standard_tests = ["modelgauge_standard_tests"]
openai = ["modelgauge_openai"]
huggingface = ["modelgauge_huggingface"]
perspective_api = ["modelgauge_perspective_api"]
google = ["modelgauge_google"]
vertexai = ["modelgauge_vertexai"]
mistral = ["modelgauge_mistral"]
all_plugins = ["modelgauge_anthropic", "modelgauge_azure", "modelgauge_demo_plugin", "modelgauge_nvidia", "modelgauge_openai", "modelgauge_standard_tests", "modelgauge_perspective_api", "modelgauge_huggingface", "modelgauge_google", "modelgauge_vertexai", "modelgauge_mistral"]
[tool.poetry.scripts]
modelbench = "modelbench.run:cli"
modelgauge = "modelgauge.main:main"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--ignore=src/modelgauge/",
"--ignore=demo_plugin/modelgauge/",
"--ignore='plugins/*/modelgauge/'"
]
pythonpath = [
"src", "tests", "tests/modelbench_tests", "tests/modelgauge_tests", "plugins"
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[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 = "., demo_plugin, plugins/standard_tests, plugins/openai, plugins/huggingface, plugins/perspective_api, src, tests"
[[tool.mypy.overrides]]
module = "modelgauge.tests.*,modelgauge.annotators.*,modelgauge.safety_model_response,plugins.*"
ignore_missing_imports = true