-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
189 lines (162 loc) · 3.83 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
186
187
188
189
[build-system]
requires = [ "poetry-core" ]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "anchoral"
version = "0.2.0"
description = "AnchorAL: Anchored Active Learning for Large and Imbalanced Datasets"
authors = [ "Pietro Lesci <[email protected]>" ]
license = "Apache-2.0"
readme = "README.md"
packages = [ { include = "src" } ]
[tool.poetry.dependencies]
python = ">=3.9,<3.10"
energizer = { path = "./energizer/", develop = true }
# lightning
# https://github.com/python-poetry/poetry/issues/6409#issuecomment-1572612891
torch = { url = "https://download.pytorch.org/whl/cu118/torch-2.0.0%2Bcu118-cp39-cp39-linux_x86_64.whl", platform = "linux", python = ">=3.9 <3.10" }
# need this because sentence-transformers installs torchvision with CUDA 11.7
torchvision = { url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.0%2Bcu118-cp39-cp39-linux_x86_64.whl", platform = "linux", python = ">=3.9 <3.10" }
torchmetrics = { git = "https://github.com/Lightning-AI/torchmetrics.git" }
lightning = "^2.0.8"
sentence-transformers = "^2.2.2"
# hydra
omegaconf = "^2.3.0"
hydra-core = "^1.3.2"
hydra-colorlog = "^1.2.0"
hydra-joblib-launcher = "^1.2.0"
hydra-submitit-launcher = "^1.2.0"
colorlog = "^6.7.0"
# plots
matplotlib = "^3.6.3"
seaborn = "^0.12.2"
altair = "^5.0.1"
# analysis
openpyxl = "^3.1.1"
polars = "^0.18.2"
duckdb = "^0.10.1"
ipykernel = "^6.20.2"
ipywidgets = "7.7.1"
# dev
nvitop = "^1.0.0"
ruff = "^0.3.5"
plotnine = "^0.13.4"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
extend-include = [ "*.ipynb" ]
# Same as Black.
line-length = 120
target-version = "py39"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = [
# # Use `X | Y` for type annotations
# "UP007",
# # Logging statement uses f-string
# "G004",
# # Function definitions that include too many arguments (>5)
# "PLR0913",
# # Comparison to `True` should be `cond is True` or `if cond:`
# "E712",
# # blanket-type-ignore
# "PGH003",
# flake8 Indentation contains tabs (W191)
"W191",
]
# # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# # select = ["E", "F"]
# select = [
# # pyflakes
# "F",
# # pycodestyle
# "E",
# "W",
# # flake8-2020
# "YTT",
# # flake8-bugbear
# "B",
# # flake8-quotes
# "Q",
# # flake8-debugger
# "T10",
# # flake8-gettext
# "INT",
# # pylint
# "PL",
# # misc lints
# "PIE",
# # flake8-pyi
# "PYI",
# # tidy imports
# "TID",
# # implicit string concatenation
# "ISC",
# # type-checking imports
# "TCH",
# # comprehensions
# "C4",
# # pygrep-hooks
# "PGH",
# # Ruff-specific rules
# "RUF",
# # flake8-bandit: exec-builtin
# "S102",
# # numpy-legacy-random
# "NPY002",
# # Perflint
# "PERF",
# # flynt
# "FLY",
# # flake8-logging-format
# "G",
# ]
# Allow autofix for all enabled rules (when `--fix`) is provided.
# fix = true
# fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
# unfixable = [ ]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false