Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
202 lines (182 loc) · 6.72 KB
/
Copy pathpyproject.toml
File metadata and controls
202 lines (182 loc) · 6.72 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "dendritic_modeling"
version = "0.6.0"
description = "DendriNet: PyTorch library for neural networks of dendritic neurons"
readme = "README_PYPI.md"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{name = "Kempner Institute for the Study of Natural and Artificial Intelligence"},
]
requires-python = ">=3.10,<4.0"
keywords = ["dendritic", "neural-networks", "pytorch", "machine-learning", "neuroscience"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent"
]
# Every hard dependency is imported by the library (tests/test_packaging.py).
# torch 2.8 is the floor: compact checkpoints use the unsigned integer dtypes
# added in 2.3, weights_only loading is a safe boundary only from 2.6, and the
# advisories against 2.6 and 2.7 are fixed in 2.8.
dependencies = [
"torch>=2.8.0,<3.0.0",
"torchvision>=0.23.0,<1.0.0",
"torchinfo>=1.7.0",
"omegaconf>=2.1.0,<3.0.0",
"PyYAML>=6.0",
"numpy>=1.21.0,<3.0.0",
"scipy>=1.7.0",
"scikit-learn>=1.0.0",
"pandas>=1.3.0,<3.0.0",
"matplotlib>=3.5.0,<4.0.0",
"seaborn>=0.11.0,<1.0.0",
"tqdm>=4.60.0",
]
[project.urls]
Homepage = "https://github.com/KempnerInstitute/DendriNet"
Documentation = "https://kempnerinstitute.github.io/DendriNet/"
Source = "https://github.com/KempnerInstitute/DendriNet"
Issues = "https://github.com/KempnerInstitute/DendriNet/issues"
Changelog = "https://github.com/KempnerInstitute/DendriNet/blob/develop/CHANGELOG.md"
[project.scripts]
dendritic-example = "dendritic_modeling.scripts.tools.export_example:main"
dendritic-train = "dendritic_modeling.scripts.training.train_experiments:cli_main"
dendritic-compact-checkpoint = "dendritic_modeling.scripts.deployment.compact_checkpoint:main"
dendritic-sweep = "dendritic_modeling.scripts.sweeps.sweep_manager:main"
dendritic-analyze = "dendritic_modeling.scripts.sweeps.result_analyzer:main"
dendritic-analyze-checkpoint = "dendritic_modeling.scripts.analysis.run_checkpoint_analysis:cli_main"
dendritic-submit-checkpoint-analysis = "dendritic_modeling.scripts.analysis.submit_checkpoint_analysis:main"
dendritic-collect-representations = "dendritic_modeling.scripts.analysis.collect_representation_accessibility:cli_main"
dendritic-collect-path-interventions = "dendritic_modeling.scripts.analysis.collect_path_matched_intervention:cli_main"
dendritic-collect-path-information = "dendritic_modeling.scripts.analysis.collect_path_matched_information:cli_main"
dendritic-collect-branch-sensitivities = "dendritic_modeling.scripts.analysis.collect_branch_local_sensitivity:main"
dendritic-collect-local-i-interventions = "dendritic_modeling.scripts.analysis.collect_layer_population_interventions:main"
dendritic-collect-checkpoint-analysis = "dendritic_modeling.scripts.analysis.collect_checkpoint_analysis:cli_main"
dendritic-collect-perturbation-response = "dendritic_modeling.scripts.analysis.collect_perturbation_response:cli_main"
dendritic-collect-gain-load-response = "dendritic_modeling.scripts.analysis.collect_gain_load_response:cli_main"
dendritic-collect-reactivation = "dendritic_modeling.scripts.analysis.collect_reactivation_dynamics:cli_main"
dendritic-collect-synaptic-support = "dendritic_modeling.scripts.analysis.collect_synaptic_support:cli_main"
dendritic-collect-source-tuning = "dendritic_modeling.scripts.analysis.collect_source_tuning_support:cli_main"
dendritic-collect-input-region-interventions = "dendritic_modeling.scripts.analysis.collect_input_region_intervention:cli_main"
dendritic-summarize-checkpoint-metrics = "dendritic_modeling.scripts.analysis.summarize_checkpoint_metrics:main"
dendritic-select-validation-epochs = "dendritic_modeling.scripts.analysis.select_validation_epochs:cli_main"
dendritic-poisson-exposure-transfer = "dendritic_modeling.scripts.analysis.run_poisson_exposure_transfer:cli_main"
dendritic-collect-poisson-transfer = "dendritic_modeling.scripts.analysis.collect_poisson_exposure_transfer:cli_main"
dendritic-collect-sweep-metrics = "dendritic_modeling.scripts.sweeps.collect_sweep_metrics:main"
dendritic-upgrade-config = "dendritic_modeling.scripts.tools.upgrade_config:main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.package-data]
"dendritic_modeling.examples" = ["*.yaml"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["dendritic_modeling*"]
namespaces = false
[project.optional-dependencies]
test = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-timeout>=2.1.0",
"pytest-xdist>=3.0.0",
"coverage[toml]>=6.5.0",
"tomli>=2.0; python_version < '3.11'",
]
lint = [
"ruff==0.15.1",
"mypy>=1.0,<1.4",
"black==26.10.1",
"isort==5.13.2",
"pre-commit>=3.0.0",
]
dev = [
"dendritic_modeling[test,lint]",
"twine>=1.11.0",
"setuptools",
"wheel",
"build",
]
compression = [
"torchao>=0.18,<0.19",
]
# Triton kernels (indexed synapse backends); Linux CUDA torch wheels ship it.
gpu = [
"triton>=3.0",
]
# Graph drawing in plotting.core.utils.
plotting = [
"networkx>=2.6",
]
# Hugging Face causal LMs for networks.architectures.transformer replacements.
transformers = [
"transformers>=4.30",
]
train = [
"jupyter>=1.0.0",
"ipykernel",
"ipython>=8.0.0",
]
# Sphinx with the extensions docs/conf.py uses (all bundled with Sphinx).
docs = [
"sphinx>=7",
"sphinx-rtd-theme>=2",
]
all = [
"dendritic_modeling[dev,train,docs,gpu,plotting]",
]
# Configuration for coverage
[tool.coverage.run]
source = ["src/dendritic_modeling"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/.*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == \\.__main\\__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
# Black formats the code (pre-commit and CI); ruff.toml configures linting
[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
\.git
| __pycache__
| \.venv
| \.pytest_cache
| build
| dist
)/
'''
# isort configuration (compatible with Black)
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
force_single_line = false
combine_as_imports = true