-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
92 lines (82 loc) · 2.99 KB
/
pyproject.toml
File metadata and controls
92 lines (82 loc) · 2.99 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
[project]
name = "nn-observability"
version = "2.4.0"
description = "Architecture predicts linear readability of decision quality in transformer activations. Cross-family evaluation with confidence controls across six model families."
readme = "README.md"
license = {text = "MIT"}
authors = [{name = "Thomas Carmichael"}]
requires-python = ">=3.12"
keywords = [
"transformer interpretability",
"neural network observability",
"learned probes",
"decision quality",
"confidence controls",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"matplotlib>=3.8.0",
"numpy>=1.26.0",
"pandas>=2.0.0",
"scikit-learn>=1.4.0",
"scipy>=1.12.0",
"statsmodels>=0.14.0",
"torch>=2.2.0",
"torchvision>=0.17.0",
]
[project.urls]
Repository = "https://github.com/tmcarmichael/nn-observability"
Issues = "https://github.com/tmcarmichael/nn-observability/issues"
[project.optional-dependencies]
transformer = [
"transformers>=4.40.0",
"datasets>=2.18.0",
"sae-lens>=4.0.0",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"ruff>=0.15",
"pre-commit>=4.0",
]
[tool.pytest.ini_options]
pythonpath = ["src"]
filterwarnings = [
"ignore:var\\(\\).*degrees of freedom:UserWarning",
"ignore::scipy.stats.ConstantInputWarning",
]
[tool.ruff]
line-length = 110
target-version = "py312"
[tool.ruff.lint]
select = ["F", "E", "W", "I", "UP", "B", "C90"]
ignore = [
"E501", # line too long (handled by formatter)
"E701", # multiple statements on one line (colon) — compact research code style
"E702", # multiple statements on one line (semicolon) — same
"E741", # ambiguous variable names (l, x, y) — math code
"B006", # mutable default args — false positives with lists in signatures
"B905", # zip() without strict= — paired iterators always match in this codebase
"UP007", # X | Y union syntax
"E402", # module-level import not at top — lazy imports at call sites (CLAUDE.md)
]
[tool.ruff.lint.per-file-ignores]
"scripts/nonlinear_probe.py" = ["I001"] # inline import gc after del model
"scripts/legacy/auxiliary_loss.py" = ["I001"] # inline import time for MPS sleep
"analysis/generate_data_macros.py" = ["I001"] # sys.path before import
"analysis/generate_tables.py" = ["I001"] # sys.path before import
"figures/fig_cross_family.py" = ["I001"] # style must import before load_results (sets sys.path)
"scripts/run_model.py" = ["I001", "E402"] # lazy imports for optional deps (datasets, transformers)
[tool.ruff.lint.mccabe]
max-complexity = 25
[tool.ruff.lint.isort]
known-first-party = ["train", "observe", "scale", "observer_variants", "seed_agreement", "inspect_weights", "transformer_observe", "sae_compare", "selective_prediction"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"