-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpyproject.toml
More file actions
214 lines (195 loc) · 6.69 KB
/
pyproject.toml
File metadata and controls
214 lines (195 loc) · 6.69 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[project]
name = "fl4health"
version = "0.4.2"
description = "Federated Learning for Health"
authors = [
{name = "Vector AI Engineering", email = "fl4health@vectorinstitute.ai"}
]
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.10.0,<3.11"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=1.24,<2.0",
"pandas>=2.0,<3.0",
"flwr>=1.18.0,<1.19.0",
"opacus>=1.3.0,<2.0.0",
"torch==2.6.0",
"pyarrow>=17.0.0,<18.0.0", # Pin as there is potential ACE with v0.14.2 that is resolved in v17.0
"dp-accounting>=0.4.3,<0.5.0",
"torchmetrics>=1.3.0,<2.0.0",
"aiohttp>=3.13.3,<4.0.0",
"ecos>=2.0.7.post1,<3.0.0",
"qpth>=0.0.16,<0.1.0",
"urllib3>=2.6.3,<3.0.0",
"grpcio>=1.60.0,<2.0.0,!=1.64.2,!=1.65.1,!=1.65.2,!=1.65.4",
"monai>=1.5.1,<2.0.0",
"nnunetv2>=2.3.1,<3.0.0",
"wandb>=0.18.0,<1.0.0",
"acvl_utils==0.2", # Pin as it was causing an issue with nnunet (ModuleNotFoundError: No module named 'blosc2')
"scikit-learn==1.5.0", # Pin as it was causing issues with nnunet
"peft>=0.14.0,<1.0.0",
"starlette>=0.49.1,<1.0.0",
"jupyter-core>=5.8.1,<6.0.0",
"fastapi>=0.121.0,<1.0.0",
"tornado>=6.5,<7.0",
"pympler>=1.1,<2.0",
"flwr-datasets>=0.5.0,<1.0.0",
"dm-tree>=0.1.9,<0.2.0",
"cmake>=3.31.6,<4.0.0",
"matplotlib>=3.10.1,<4.0.0",
"pyasn1>=0.6.2",
]
[dependency-groups]
dev = [
# locked the 2.15 version because of restrictions with tensorflow-io
# (see https://pypi.org/project/tensorflow-io/ section "TensorFlow Version Compatibility")
# Note: tensorflow 2.15 requires keras<2.16
# SECURITY NOTE: keras 2.15.0 has known CVEs (CVE-2024-55459, CVE-2025-9906, CVE-2025-12058, CVE-2025-12060)
# that require keras>=3.12.0 to fix. However, upgrading requires tensorflow>=2.16 which breaks tensorflow-io
# compatibility. These CVEs are accepted risk until tensorflow-io supports newer tensorflow versions.
"tensorflow>=2.15,<2.16",
"keras>=2.15.0,<2.16",
"nltk>=3.8.0,<4.0.0",
"torchvision==0.21.0",
"torchinfo>=1.8.0,<2.0.0",
"ipykernel>=6.25.1,<7.0.0",
"pytest-test-groups>=1.2.1,<2.0.0",
"torchtext>=0.14.1,<1.0.0",
"torchdata>=0.7.0,<1.0.0",
"torcheval>=0.0.6,<1.0.0",
"transformers>=4.37.2,<5.0.0",
"datasets>=2.17.1,<3.0.0",
]
test = [
"pytest>=8.3.4,<9.0.0",
"mock>=5.1.0,<6.0.0",
"pytest-cov>=4.1.0,<5.0.0",
"freezegun>=1.4.0,<2.0.0",
"pytest-asyncio>=0.25.2,<1.0.0",
"py-cpuinfo>=9.0.0,<10.0.0",
]
codestyle = [
"ruff>=0.12.1,<1.0.0",
"pre-commit>=3.0.1,<4.0.0",
"toml>=0.10.2,<1.0.0",
"types-requests>=2.28.11.8",
"types-setuptools>=65.7.0.3",
"types-protobuf>=4.24.0.4",
"types-pyyaml>=6.0.12.12",
"types-six>=1.16.21.9",
"types-tabulate>=0.9.0.3",
"types-tqdm>=4.66.0,<5.0.0",
"pandas-stubs>=2.0.0,<3.0.0",
"types-mock>=5.1.0,<6.0.0",
"pip-audit>=2.4,<3.0",
"cyclonedx-python-lib<6", # fix to make pip-audit 2.4 work
"mypy>=1.9.0,<2.0.0",
]
picai = [
"simpleitk>=2.3.1,<3.0.0",
"openpyxl>=3.1.2,<4.0.0",
"picai_eval>=1.4.6,<2.0.0",
"mlflow>=2.12.2,<4.0.0",
"fire>=0.6.0,<1.0.0",
"einops==0.8.0",
]
llm = [
"trl>=0.14.0,<1.0.0",
"tiktoken>=0.8.0,<1.0.0",
"blobfile>=3.0.0,<4.0.0",
"sentencepiece>=0.2.0,<1.0.0",
"evaluate>=0.4.3,<1.0.0",
"py7zr>=0.22.0,<1.0.0",
"rouge-score>=0.1.2,<1.0.0",
"deepspeed==0.15.1",
]
docs = [
"mkdocs>=1.6.0,<2.0.0",
"mkdocs-material>=9.5.15,<10.0.0",
"mkdocstrings[python]>=0.24.0,<1.0.0",
"mkdocs-autorefs>=1.0.1,<2.0.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
default-groups = ["dev", "test", "codestyle"]
[tool.ruff]
include = ["*.py", "pyproject.toml"]
exclude = ["mypy_disallow_legacy_types.py", "*.ipynb", "conf.py"]
line-length = 119
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"RET", # flake8-return
"SIM", # flake8-simplify
"ICN", # flake8-import-conventions
"Q", # flake8-quotes
"RSE", # flake8-raise
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"W", # pycodestyle
"N", # pep8-naming
"ERA", # eradicate
"PL", # pylint
"D213", # Multiline Docstrings start on newline
]
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL", "D213"]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"ERA001", # Found commented-out code (too many false positives with math comments)
"PLR0913", # Too many arguments
"COM812", # Missing trailing comma
"A001", # Ignore variable `input` is shadowing a Python builtin
"A002", # Ignore variable `input` is shadowing a Python builtin in function
"PLR0915", # Too many statements (> 50)
"PLR0912", # Too many branches (>12)
"PLW2901", # `for` loop variable `target` overwritten by assignment target
"D212", # Multi-line docstring summary should start at the first line
"D301", # r-strings for docstrings with backslashes
"D101", # Public class requires documentation. Ignoring since we document our inits
"D100", # TEMPORARY IGNORE: Ignore module level docstrings requirement
"D104", # TEMPORARY IGNORE: Ignore package level docstrings requirement
"D103", # TEMPORARY IGNORE WILL FIX: Undocumented public function
"D102", # TEMPORARY IGNORE WILL FIX: Undocumented public method
]
# Ignore import violations in all `__init__.py` files.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
# Ignoring undocumented public functions, public init, magic method, and magic numbers
"tests/*" = ["D103", "D105", "D107", "PLR2004"]
# Ignoring undocumented, public init, magic method, and magic numbers
"research/*" = ["PLR2004", "D105", "D107"]
# Ignoring undocumented public init
"examples/*" = ["D107"]
[tool.ruff.lint.pep8-naming]
ignore-names = ["SimpleITK", "F", "NN"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pycodestyle]
max-doc-length = 119
[tool.ruff.lint.flake8-builtins]
strict-checking = false
[tool.pytest.ini_options]
markers = [
"smoketest: marks tests as smoke tests (deselect with '-m \"not smoketest\"')",
]
asyncio_default_fixture_loop_scope = "session"