-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
219 lines (201 loc) · 5.74 KB
/
pyproject.toml
File metadata and controls
219 lines (201 loc) · 5.74 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
[build-system]
requires = ["hatchling>=1.21"]
build-backend = "hatchling.build"
[project]
name = "meta-learning-toolkit"
version = "2.5.0"
description = "Production-ready meta-learning algorithms with research-accurate implementations of MAML, Prototypical Networks, and test-time compute scaling"
readme = "README.md"
license = {text = "Custom Non-Commercial License"}
authors = [{name = "Benedict Chen", email = "benedict@benedictchen.com"}]
maintainers = [{name = "Benedict Chen", email = "benedict@benedictchen.com"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
]
keywords = ["meta-learning", "few-shot", "MAML", "prototypical-networks", "test-time-compute"]
requires-python = ">=3.9"
dependencies = [
"numpy>=1.21.0",
"torch>=2.0.0",
"torchvision>=0.15.0",
"scipy>=1.7.0",
"scikit-learn>=1.0.0",
"tqdm>=4.64.0",
"pyyaml>=6.0",
"requests>=2.25.0",
"rich>=12.0.0",
]
[project.optional-dependencies]
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-benchmark>=4.0",
"pytest-mock>=3.10",
]
dev = [
"ruff>=0.1.0",
"mypy>=1.5.0",
"pre-commit>=3.0.0",
"build>=0.10.0",
"twine>=4.0.0",
]
datasets = [
"torchvision>=0.15.0",
"pillow>=9.0.0",
"h5py>=3.7.0",
]
visualization = [
"matplotlib>=3.5.0",
"seaborn>=0.11.0",
"wandb>=0.15.0",
]
research = [
"learn2learn>=0.1.7",
"higher>=0.2.1",
"torchmeta>=1.8.0",
]
all = [
"pytest>=7.0", "pytest-cov>=4.0", "pytest-benchmark>=4.0", "pytest-mock>=3.10",
"ruff>=0.1.0", "mypy>=1.5.0", "pre-commit>=3.0.0", "build>=0.10.0", "twine>=4.0.0",
"torchvision>=0.15.0", "pillow>=9.0.0", "h5py>=3.7.0",
"matplotlib>=3.5.0", "seaborn>=0.11.0", "wandb>=0.15.0",
"learn2learn>=0.1.7", "higher>=0.2.1", "torchmeta>=1.8.0"
]
[project.urls]
Homepage = "https://github.com/benedictchen/meta-learning"
Documentation = "https://github.com/benedictchen/meta-learning/blob/main/README.md"
Repository = "https://github.com/benedictchen/meta-learning"
Issues = "https://github.com/benedictchen/meta-learning/issues"
Funding = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WXQKYYKPHWXHS"
Sponsor = "https://github.com/sponsors/benedictchen"
[project.scripts]
mlfew = "meta_learning.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/meta_learning"]
[tool.hatch.build.targets.sdist]
exclude = [
"data",
"data/**",
"htmlcov",
"htmlcov/**",
".coverage*",
"*.pyc",
"__pycache__/**",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = [
"--cov=src/meta_learning",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--strict-markers",
"--strict-config",
"-ra",
"--tb=short",
"--maxfail=5",
"--durations=10",
"--disable-warnings"
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"gpu: marks tests that require GPU",
"benchmark: marks performance benchmark tests",
"regression: marks mathematical correctness regression tests",
"deterministic: marks tests requiring deterministic behavior",
"memory_intensive: marks tests that use significant memory",
"parametrize: marks parametrized tests with multiple inputs",
"property_based: marks property-based testing with hypothesis"
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::FutureWarning",
"ignore::UserWarning:torch.*",
"ignore::UserWarning:sklearn.*",
"ignore::PendingDeprecationWarning",
"ignore::RuntimeWarning:numpy.*",
"error::UserWarning:meta_learning.*"
]
minversion = "7.0"
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*", "*Tests", "*Test"]
python_functions = ["test_*"]
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "S", "B", "A", "C4", "ICN", "PIE", "T20", "RET", "SIM", "ARG", "PL", "R", "C90"]
ignore = ["E501", "S101", "PLR2004", "PLR0913", "S311", "B008", "C901"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["S101", "PLR2004", "ARG001"]
"src/meta_learning/cli.py" = ["T20"]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
no_implicit_optional = true
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"torch.*",
"torchvision.*",
"sklearn.*",
"scipy.*",
"matplotlib.*",
"tqdm.*",
"rich.*"
]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/test_*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:"
]
[tool.coverage.xml]
output = "coverage.xml"
# Black configuration for consistent formatting
[tool.black]
line-length = 127
target-version = ['py39']
include = '\.pyi?$'
extend-exclude = '''
/(
old_archive
| \.pytest_cache
| build
| dist
)/
'''
# isort configuration for import sorting
[tool.isort]
profile = "black"
line_length = 127
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
skip_glob = ["old_archive/*", "build/*", "dist/*"]