forked from jpolz/WeatherGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (118 loc) · 3.11 KB
/
pyproject.toml
File metadata and controls
137 lines (118 loc) · 3.11 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
[project]
name = "weathergen"
version = "0.1.0"
description = "The WeatherGenerator Machine Learning Earth System Model"
readme = "README.md"
authors = [
{ name = "WeatherGenerator collaboration" }
]
requires-python = ">=3.11,<3.13"
# TODO: split the plotting dependencies into their own dep groups, they are not required.
dependencies = [
'torch==2.6.0',
'numpy~=2.2',
'astropy_healpix~=1.1.2',
'zarr~=2.17',
'anemoi-datasets~=0.5.16',
'pandas~=2.2',
'pynvml',
'tqdm',
'matplotlib',
'packaging',
'wheel',
'psutil',
"flash-attn; sys_platform == 'linux'",
"polars~=1.25.2",
"omegaconf~=2.3.0",
]
[project.urls]
Homepage = "https://www.weathergenerator.eu"
Documentation = "https://readthedocs.org"
Repository = "https://github.com/ecmwf/WeatherGenerator.git"
Issues = "https://github.com/ecmwf/WeatherGenerator/issues"
[project.scripts]
train = "weathergen:train"
train_continue = "weathergen:train_continue"
evaluate = "weathergen:evaluate"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
# The development dependencies
dev = [
"pytest~=8.3.5",
"pytest-mock>=3.14.1",
"ruff==0.9.7",
]
[tool.black]
# Wide rows
line-length = 100
# The linting configuration
[tool.ruff]
# Wide rows
line-length = 100
[tool.ruff.lint]
# All disabled until the code is formatted.
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
# These rules are sensible and should be enabled at a later stage.
ignore = [
"E501",
"E721",
"E722",
# "B006",
"B011",
"UP008",
"SIM117",
"SIM118",
"SIM102",
"SIM401",
# To ignore, not relevant for us
"E741",
]
[tool.uv]
# This guarantees that the build is deterministic and will not be impacted
# by future releases of dependencies or sub-dependencies.
# See https://docs.astral.sh/uv/reference/settings/#exclude-newer
# TODO: pytorch does not publish valid release timestamps, so sadly it does not work.
# exclude-newer = "2025-03-14T00:00:00Z"
# Following the recommendations from https://docs.astral.sh/uv/guides/integration/pytorch
# The current setup is:
# linux == GPU + flashattention
# windows == GPU
# macos == CPU
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cpu", marker = "sys_platform == 'macosx'"},
]
# This URL was evaluated this way:
# uv run ~/WeatherGenerator-private/hpc/hpc2020/ecmwf/get-flash-atten.sh
flash-attn = [
{ url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux'" },
]
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"