Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
%>cd WeatherGenerator
%>uv sync

# install flash_attn which is not uv compatible
# (this step might take very long, it is faster when ninja is available but then
# MAX_JOBS=4 should be set as environment variable; the step might need to be run
# on a compute node to ensure the correct CUDA environment is available)
%>uv pip install torch
%>uv pip install flash_attn --no-build-isolation

%>uv run train
```
50 changes: 37 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ authors = [

requires-python = ">=3.11,<3.13"
# TODO: split the plotting dependencies into their own dep groups, they are not required.
dependencies = [ 'torch',
'numpy',
'astropy_healpix',
'zarr',
'anemoi-datasets',
'pandas',
'pynvml',
'tqdm',
'matplotlib',
'packaging',
'wheel',
'psutil']
dependencies = [
'torch==2.6.0',
'numpy~=2.2',
'astropy_healpix~=1.0',
'zarr~=2.17',
'anemoi-datasets~=0.5',
'pandas~=2.2',
'pynvml',
'tqdm',
'matplotlib',
'packaging',
'wheel',
'psutil',
"flash-attn",
]

[project.urls]
Homepage = "https://www.weathergenerator.eu"
Expand Down Expand Up @@ -91,4 +94,25 @@ ignore = [
"F811",
# 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
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true

[tool.uv.sources]
torch = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
# 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" }
Loading