Skip to content
Open
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
32 changes: 10 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ dev = [
[project.optional-dependencies]

cpu = [
'torch==2.6.0',
'torch==2.9.1',
]

gpu = [
"torch==2.6.0; sys_platform == 'linux'",
"torch==2.9.1; sys_platform == 'linux'",
# flash-attn also has a torch dependency.
"flash-attn",
]
Expand Down Expand Up @@ -167,7 +167,7 @@ link-mode = "symlink"
# 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 = "2026-02-27T00:00:00Z"
exclude-newer = "2026-04-27T00:00:00Z"

# The minimum version of uv required.
# It is tightly controlled because the format of uv.lock has changed
Expand All @@ -192,12 +192,6 @@ conflicts = [
]


[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true


[tool.pyrefly]
project-includes = ["src/"]
project-excludes = [
Expand Down Expand Up @@ -232,25 +226,19 @@ weathergen-readers-extra = { workspace = true }


flash-attn = [
# The build of Cathal O'Brien is not compatible with the libc build on santis.
# Hardcode the reference to the swiss cluster for the time being.
# TODO: open issue
# { url = "https://github.com/cathalobrien/get-flash-attn/releases/download/v0.1-alpha/flash_attn-2.7.4+cu12torch2.6cxx11abiFALSE-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
# This version was rebuilt locally on santis and uploaded.
{ url = "https://object-store.os-api.cci1.ecmwf.int/weathergenerator-dev/wheels/flash_attn-2.7.3-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
{ url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiTRUE-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
{ url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.9cxx11abiTRUE-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
{ url = "https://github.com/cathalobrien/get-flash-attn/releases/download/v0.1-alpha/flash_attn-2.8.3+cu12torch2.9cxx11abiFALSE-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
# There is no official support for flash-attn on macos
]


torch = [
# Explicit pin for GPU
{ url = "https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp312-cp312-linux_aarch64.whl", marker = 'sys_platform == "linux" and platform_machine == "aarch64"', extra="gpu" },
{ url = "https://download.pytorch.org/whl/cu126/torch-2.6.0%2Bcu126-cp312-cp312-manylinux_2_28_x86_64.whl", marker = 'sys_platform == "linux" and platform_machine == "x86_64"', extra="gpu" },
{ url = "https://download-r2.pytorch.org/whl/cu126/torch-2.9.1+cu126-cp312-cp312-manylinux_2_28_aarch64.whl", marker = 'sys_platform == "linux" and platform_machine == "aarch64"', extra="gpu" },
{ url = "https://download-r2.pytorch.org/whl/cu126/torch-2.9.1+cu126-cp312-cp312-manylinux_2_28_x86_64.whl", marker = 'sys_platform == "linux" and platform_machine == "x86_64"', extra="gpu" },
# Explicit pin for CPU.
{ url = "https://download.pytorch.org/whl/cpu/torch-2.6.0%2Bcpu-cp312-cp312-linux_x86_64.whl",marker = "sys_platform == 'linux' and platform_machine == 'x86_64'",extra = "cpu" },
{ url = "https://download.pytorch.org/whl/cpu/torch-2.6.0%2Bcpu-cp312-cp312-manylinux_2_28_aarch64.whl",marker = "sys_platform == 'linux' and platform_machine == 'aarch64'",extra = "cpu" },
{ url = "https://download.pytorch.org/whl/cpu/torch-2.6.0-cp312-none-macosx_11_0_arm64.whl",marker = "sys_platform == 'darwin'", extra="cpu" },
{ url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1+cpu-cp312-cp312-manylinux_2_28_aarch64.whl",marker = "sys_platform == 'linux' and platform_machine == 'aarch64'",extra = "cpu" },
{ url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1+cpu-cp312-cp312-manylinux_2_28_x86_64.whl",marker = "sys_platform == 'linux' and platform_machine == 'x86_64'",extra = "cpu" },

# No acceleration for now.
# TODO: explore pytorch + metal backend
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'", extra="gpu"},
Expand Down
Loading