-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (83 loc) · 3.42 KB
/
Copy pathpyproject.toml
File metadata and controls
94 lines (83 loc) · 3.42 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
[project]
authors = [
{ name = "Benjamin Matthias Ruppik", email = "mail@ruppik.net" },
{ name = "Julius von Rohrscheidt", email = "julius.rohrscheidt@helmholtz-munich.de" },
]
name = "grokking"
version = "0.3.0"
description = "Toy examples of grokking for small transformers on arithmetic tasks, and computation of topological local estimates."
readme = "README.md"
requires-python = ">=3.12.0,<3.13"
dependencies = [
"contourpy<1.3", # This restriction is needed to avoid issues with the HPC cluster
"gitpython>=3.1.44",
"hydra-core>=1.3.2",
"hydra-joblib-launcher>=1.2.0",
"kaleido<0.2.1", # Note: We need to add the explicit kaleido dependency since it is required for the image export, the '<1' restriction is needed to avoid the Google Chrome dependency which causes issues on the HPC cluster. The '<0.2.1' restriction is needed to avoid issues on macOS ARM.
"matplotlib<3.10", # Note: We need to add the explicit matplotlib dependency here since scikit-dimension needs this # This restriction is needed to avoid issues with the HPC cluster
"numpy>=2.2.4,<2.3", # This restriction is needed to avoid issues with the HPC cluster
"omegaconf>=2.3.0",
"pandas>=2.2.3,<2.3", # This restriction is needed to avoid issues with the HPC cluster
"plotly>=6.0.1",
"python-dateutil>=2.9.0.post0",
"python-dotenv>=1.1.0",
"rich>=14.0.0",
"scikit-dimension>=0.3.4",
"scikit-learn>=1.6.1,<1.7", # This restriction is needed to avoid issues with the HPC cluster
"scipy<1.17", # This restriction is needed to avoid issues with the HPC cluster
"torch>=2.3,<2.4", # This restriction is needed to avoid issues with the HPC cluster
"tqdm>=4.67.1",
"transformers>=4.51.1,<5", # This restriction is needed to avoid issues with the HPC cluster
"wandb>=0.19.8,<0.22", # This restriction is needed to avoid issues with the HPC cluster
"zarr>=3.0.6",
]
[project.scripts]
train_grokk = "grokking.scripts.train_grokk:main"
# Note:
# The following section is needed on certain HPC clusters to use a PyPI mirror,
# since we might not have unrestricted internet access on the cluster.
# This section should be removed when using the package outside of the cluster,
# and before the package is released.
#
# [[tool.uv.index]]
# name = "[ANONYMIZED_tool.uv.index_NAME]"
# url = "[ANONYMIZED_PYPI_REPO]"
# default = true
[build-system]
requires = ["uv_build>=0.8.6"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "grokking"
module-root = ""
[tool.ruff]
# extend = "$HOME/.config/ruff.toml"
target-version = "py312"
# Set the maximum line length.
line-length = 120
select = ["ALL"]
# Add the `line-too-long` rule to the enforced rule set. By default, Ruff omits rules that
# overlap with the use of a formatter, like Black, but we can override this behavior by
# explicitly adding the rule.
# extend-select = ["E501"]
ignore = ["RET504", "D102"]
[tool.ruff.lint.pylint]
max-args = 7
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pyright]
include = ["grokking", "tests"]
exclude = [
"**/node_modules",
"**/__pycache__",
".venv",
"data",
"outputs",
"outputs.backup.*",
"wandb",
"wandb.backup.*",
]
ignore = ["src/oldstuff"]
defineConstant = { DEBUG = true }
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]