-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (128 loc) · 3.78 KB
/
Copy pathpyproject.toml
File metadata and controls
142 lines (128 loc) · 3.78 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
[project]
name = "autocast"
version = "0.0.1"
description = "Spatiotemporal forecasting"
readme = "README.md"
authors = [
{ name = "AI for Physical Systems Team at The Alan Turing Institute", email = "ai4physics@turing.ac.uk" },
]
requires-python = ">=3.11,<3.13"
dependencies = [
"autoemulate>=1.2.0",
"azula>=0.7.0",
"beartype>=0.22.8",
"einops>=0.8.1",
"heavyball>=1.4.3",
"hydra-core>=1.3.2",
"h5py>=3.15.1",
"jaxtyping>=0.3.3",
"lightning>=2.5.6",
"neuraloperator>=2.0.0",
"the-well>=1.1.0",
"timm>=0.9",
"torch>=2.9.1",
"wandb>=0.18.7",
]
[project.optional-dependencies]
dev = [
"ipykernel>=7.1.0",
"pytest>=9.0.1",
"pytest-cov>=7.0.0",
"ruff==0.14.4",
"pyright==1.1.407",
"pre-commit>=4.4.0",
]
[project.scripts]
autocast = "autocast.scripts.workflow:main"
train_encoder_processor_decoder = "autocast.scripts.train.encoder_processor_decoder:main"
train_autoencoder = "autocast.scripts.train.autoencoder:main"
evaluate_encoder_processor_decoder = "autocast.scripts.eval.encoder_processor_decoder:main"
cache_latents = "autocast.scripts.cache_latents:main"
[build-system]
requires = ["uv_build>=0.8.15,<0.9.0"]
build-backend = "uv_build"
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"D", # docstring conventions
"E",
"F",
"W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
]
ignore = [
"PLR2004", # Magic value used in comparison
"EM102", # Exception must not use an f-string literal, assign to variable first
"ISC001", # Conflicts with formatter
# "D417", # Missing trailing new line in docstring
"D100", # Missing docstring in public module
"D102", # Missing docstring in public class, TODO: remove in future
"D104", # Missing docstring in public package
"PLR0913", # too many arguments
"RET504", # Allow assignment to variable before return
]
unfixable = [
"F401", # Would remove unused imports
"F841", # Would remove unused variables
]
flake8-unused-arguments.ignore-variadic-names = true # allow unused *args/**kwargs
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D"]
# https://docs.astral.sh/uv/guides/integration/pytorch/#using-a-pytorch-index
# CUDA wheels (used automatically on GH if available)
[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
[tool.uv.sources]
autoemulate = { git = "https://github.com/alan-turing-institute/autoemulate.git" }
torch = [
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
[tool.pytest.ini_options]
testpaths = [
"tests",
]
pythonpath = [
"tests",
]
norecursedirs = [
"outputs",
"slurm_scripts",
]
filterwarnings = [
# Ignore Lightning warnings that are expected/benign in test environment
"ignore:You are trying to `self.log\\(\\)` but the `self.trainer` reference is not registered:UserWarning",
"ignore:GPU available but not used:UserWarning",
"ignore:The '.*_dataloader' does not have many workers:UserWarning",
"ig"
]