From 1a750d690dda890066dc44a1315fd46855e36a67 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Mon, 14 Feb 2022 14:13:06 +0000 Subject: [PATCH 1/2] Must use Python 3.9 or above Fixes #14 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7fc7ab1..f1955b2 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ pip install -e . Alternatively, you can also install a usually older version through ```pip install metnet``` +Please ensure that you're using Python version 3.9 or above. + ## Data While the exact training data used for both MetNet and MetNet-2 haven't been released, the papers do go into some detail as to the inputs, which were GOES-16 and MRMS precipitation data, as well as the time period covered. We will be making those splits available, as well as a larger dataset that covers a longer time period, with [HuggingFace Datasets](https://huggingface.co/datasets/openclimatefix/goes-mrms)! From 55f6830e89133dda9cc68a08dd21f332d573fea6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 14:13:42 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_model.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/test_model.py b/tests/test_model.py index 5f2114d..c22cad8 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -28,6 +28,7 @@ def test_metnet_creation(): ) assert not torch.isnan(out).any(), "Output included NaNs" + def test_metnet_backwards(): model = MetNet( hidden_dim=32, @@ -36,7 +37,7 @@ def test_metnet_backwards(): output_channels=12, sat_channels=12, input_size=32, - ) + ) # MetNet expects original HxW to be 4x the input size x = torch.randn((2, 12, 16, 128, 128)) out = model(x) @@ -47,7 +48,7 @@ def test_metnet_backwards(): 12, 8, 8, - ) + ) y = torch.randn((2, 24, 12, 8, 8)) F.mse_loss(out, y).backward() assert not torch.isnan(out).any(), "Output included NaNs" @@ -86,6 +87,7 @@ def test_metnet2_creation(): ) assert not torch.isnan(out).any(), "Output included NaNs" + def test_metnet2_backward(): model = MetNet2( forecast_steps=8, @@ -95,7 +97,7 @@ def test_metnet2_backward(): lstm_channels=32, encoder_channels=64, center_crop_size=16, - ) + ) # MetNet expects original HxW to be 4x the input size x = torch.randn((2, 6, 12, 256, 256)) out = model(x) @@ -106,7 +108,7 @@ def test_metnet2_backward(): 12, 64, 64, - ) - y = torch.rand((2,8,12,64,64)) + ) + y = torch.rand((2, 8, 12, 64, 64)) F.mse_loss(out, y).backward() - assert not torch.isnan(out).any(), "Output included NaNs" \ No newline at end of file + assert not torch.isnan(out).any(), "Output included NaNs"