-
Notifications
You must be signed in to change notification settings - Fork 33
/
pyproject.toml
83 lines (74 loc) · 2.45 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "eleuther-elk"
description = "Keeping language models honest by directly eliciting knowledge encoded in their activations"
readme = "README.md"
requires-python = ">=3.10"
keywords = ["nlp", "interpretability", "language-models", "explainable-ai"]
license = { text = "MIT License" }
dependencies = [
# Allows us to use device_map in from_pretrained. Also needed for 8bit
"accelerate",
# For pseudolabel and prompt normalization. We're picky about the version because
# the package isn't guaranteed to be stable yet.
"concept-erasure==0.1.0",
# Added distributed.split_dataset_by_node for IterableDatasets
"datasets>=2.9.0",
"einops",
# Introduced numpy.typing module
"numpy>=1.20.0",
# For logging. Indirectly required by datasets, but just to be safe we specify it here.
"pandas",
# Basically any version should work as long as it supports the user's CUDA version
"pynvml",
# We upstreamed bugfixes for Literal types in 0.1.1
"simple-parsing>=0.1.1",
# Version 1.11 introduced Fully Sharded Data Parallel, which we plan to use soon
"torch>=1.11.0",
# Doesn't really matter but versions < 4.0 are very very old (pre-2016)
"tqdm>=4.0.0",
# 4.0 introduced the breaking change of using return_dict=True by default
"transformers>=4.0.0",
# required by promptsource, which doesn't specify a version
"jinja2",
# For visualization of results
"plotly==5.14.1",
"kaleido==0.2.1",
"rich==13.3.5"
]
version = "0.1.1"
[project.optional-dependencies]
dev = [
"hypothesis",
"pre-commit",
"pytest",
"pyright==1.1.304",
"scikit-learn",
"pyfakefs"
]
8bit = [
"bitsandbytes",
]
[project.scripts]
elk = "elk.__main__:run"
[tool.pyright]
include = ["elk*"]
reportPrivateImportUsage = false
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.setuptools.package-data]
elk = ["*.json", "*.yaml"]
[tool.setuptools.packages.find]
include = ["elk"]
[tool.ruff]
# Enable pycodestyle (`E`), Pyflakes (`F`), and isort (`I`) codes
# See https://beta.ruff.rs/docs/rules/ for more possible rules
select = ["E", "F", "I"]
# Same as Black.
line-length = 88
# Avoid automatically removing unused imports in __init__.py files.
# Such imports will be flagged with a dedicated message suggesting
# that the import is either added to the module's __all__ symbol
ignore-init-module-imports = true