Skip to content

Commit b3a1aa5

Browse files
committed
Add stub data, healpy
1 parent 6749f1a commit b3a1aa5

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

.github/workflows/workflows.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
os: [ubuntu-latest]
14+
os: [ubuntu-latest, macos-latest]
1515
python-version: ["3.11", "3.12"]
1616
torch-version: [2.4.0]
1717
include:
1818
- torch-version: 2.4.0
1919
torchvision-version: 0.19.0
2020
steps:
21+
- uses: prefix-dev/setup-pixi@v0.8.3
22+
with:
23+
pixi-version: v0.41.4
24+
cache: true
25+
- run: pixi run test
2126
- uses: actions/checkout@v2
2227
- name: Set up Python ${{ matrix.python-version }}
2328
uses: actions/setup-python@v2
@@ -30,7 +35,7 @@ jobs:
3035
- name: Install internal dependencies
3136
run: |
3237
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-${{ matrix.torch-version}}+cpu.html
33-
if [ ${{ matrix.torch-version}} == 2.3.0 ]; then pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/repo.html; fi
38+
if [ ${{ matrix.torch-version}} == 2.4.0 ]; then pip install dgl -f https://data.dgl.ai/wheels/torch-2.4/repo.html; fi
3439
- name: Install main package
3540
run: |
3641
pip install -e .
@@ -64,7 +69,7 @@ jobs:
6469
- name: Run pytest
6570
run: |
6671
# import dgl to initialize backend
67-
if [ ${{ matrix.torch-version}} == 2.3.0 ]; then python3 -c "import dgl"; fi
72+
if [ ${{ matrix.torch-version}} == 2.4.0 ]; then python3 -c "import dgl"; fi
6873
export PYTEST_COMMAND="pytest $PYTESTCOV $PYTESTXDIST -s"
6974
echo "Will be running this command: $PYTEST_COMMAND"
7075
eval $PYTEST_COMMAND

graph_weather/models/layers/grid_to_points.py

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
This is designed to abstract away the lat/lon points and as a layer that can be put in front of models that more expecta regular lat/lon grid as input.
3+
"""
4+

graph_weather/models/weathermesh/weathermesh2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def __init__(
133133
self.timesteps = timesteps
134134

135135
def forward(
136-
self, x_2d: torch.Tensor, x_3d: torch.Tensor, forecast_steps: int
136+
self, surface: torch.Tensor, pressure: torch.Tensor, forecast_steps: int
137137
) -> WeatherMeshOutput:
138138
# Encode input
139-
latent = self.encoder(x_2d, x_3d)
139+
latent = self.encoder(surface, pressure)
140140

141141
# Apply processors for each forecast step
142142
for _ in range(forecast_steps):

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pysolar = "*"
7777
rtree = "*"
7878
pixi-pycharm = ">=0.0.8,<0.0.9"
7979
uv = ">=0.6.2,<0.7"
80+
healpy = ">=1.18.1,<2"
8081

8182

8283
[tool.pixi.environments]

0 commit comments

Comments
 (0)