-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
185 lines (159 loc) · 4.33 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
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
[tool.poetry]
name = "mmlearn"
version = "0.1.0a1" # https://www.python.org/dev/peps/pep-0440/#version-schemes
description = "A modular framework for research on multimodal representation learning."
readme = "README.md"
authors = ["Vector AI Engineering <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/VectorInstitute/mmlearn"
packages = [
{ include = "mmlearn"},
]
[tool.poetry.dependencies]
python = ">=3.10, <3.13"
numpy = "^1.26.4"
pyarrow = "^17.0.0"
hydra-core = "^1.3.2"
hydra-zen = "^0.13.0"
hydra-submitit-launcher = "^1.2.0"
transformers = "^4.46.1"
torch = "^2.4.1"
lightning = "^2.4.0"
pandas = {version="^2.2.3", extras=["performance"]}
bottleneck = "^1.4.2"
torchvision = "^0.19.1"
opencv-python = {version = "^4.10.0.84", optional = true}
timm = {version = "^1.0.11", optional = true}
torchaudio = {version = "^2.4.1", optional = true}
peft = {version = "^0.13.2", optional = true}
[tool.poetry.group.vision.dependencies]
opencv-python = "^4.10.0.84"
timm = "^1.0.11"
[tool.poetry.group.audio.dependencies]
torchaudio = "^2.4.1"
[tool.poetry.group.peft]
optional = true
[tool.poetry.group.peft.dependencies]
peft = "^0.13.2"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
wandb = "^0.18.5"
ipykernel = "^6.29.5"
ipython = "8.30.0"
ipywidgets = "^8.1.5"
h5py = "^3.12.1"
scikit-learn = "^1.5.2"
faiss-gpu = "^1.7.2"
pip = "^24.3.1"
datasets = "^3.1.0"
[tool.poetry.extras]
peft = ["peft"]
vision = ["opencv-python", "timm"]
audio = ["torchaudio"]
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
ruff = "^0.7.2"
mypy = "^1.13.0"
pytest = "^8.3.3"
pre-commit = "^4.0.1"
nbqa = { version = "^1.9.0", extras = ["toolchain"] }
pip-audit = "^2.7.3"
typos = "^1.27.0"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
numpydoc = "^1.8.0"
sphinx = "^8.1.3"
sphinxcontrib-apidoc = "^0.5.0"
sphinx-autodoc-typehints = "^2.5.0"
myst-parser = "^4.0.0"
sphinx-design = "^0.6.1"
sphinx-copybutton = "^0.5.2"
sphinx-autoapi = "^3.4.0"
nbsphinx = "^0.9.5"
ipython = "^8.30.0"
ipykernel = "^6.29.5"
furo = "^2024.8.6"
[tool.mypy]
ignore_missing_imports = true
install_types = true
pretty = true
namespace_packages = true
explicit_package_bases = true
non_interactive = true
warn_unused_configs = true
allow_any_generics = false
allow_untyped_calls = false
allow_untyped_defs = false
allow_incomplete_defs = false
check_untyped_defs = true
allow_untyped_decorators = false
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
extra_checks = true
[tool.ruff]
include = ["*.py", "pyproject.toml", "*.ipynb"]
line-length = 88
[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
]
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
ignore = [
"E501", # line length violation
"C901", # `function_name` is too complex
"PLR0913", # Too many arguments
"PLR2004", # Magic value used in comparison
"COM812", # Missing trailing comma
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"] # Ignore import violations in all `__init__.py` files.
"projects/*" = ["D", "F", "I"] # Ignore docstring, pyflakes, and isort violations in all `projects` files.
[tool.ruff.lint.pep8-naming]
ignore-names = ["X*", "setUp*"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
pythonpath = [
"."
]
markers = [
"integration_test: marks tests as integration tests",
]
[tool.poetry.scripts]
mmlearn_run = 'mmlearn.cli.run:main'
[tool.typos.default.extend-words]
MUC = "MUC"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"