From 9753a81be64aba3ba699aa957a30aa0bc6f133ef Mon Sep 17 00:00:00 2001 From: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:33:45 +0100 Subject: [PATCH 1/5] Update pyproject.toml #229 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0ddb7bda..6d2769e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "ipykernel", "h5netcdf", "torch>=2.0.0", - "lightning>=2.0.1", + "lightning>=2.0.1,<=2.3.0", "torchvision", "pytest", "pytest-cov", From 50113d29f02ac28287729260d0646f2e1da34f6a Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Mon, 1 Jul 2024 14:46:46 +0100 Subject: [PATCH 2/5] pin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d2769e5..dddf0863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "ipykernel", "h5netcdf", "torch>=2.0.0", - "lightning>=2.0.1,<=2.3.0", + "lightning==2.3.0", "torchvision", "pytest", "pytest-cov", From 2d55473cbe81059acc03ab2b4dc2060f099e5a11 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Mon, 1 Jul 2024 15:02:46 +0100 Subject: [PATCH 3/5] use pytorch_lightning in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dddf0863..c0233394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "ipykernel", "h5netcdf", "torch>=2.0.0", - "lightning==2.3.0", + "pytorch_lightning==2.3.0", "torchvision", "pytest", "pytest-cov", From a570d88f1c608e47da3e7d32fc762b57ba0e8e01 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Mon, 1 Jul 2024 15:35:48 +0100 Subject: [PATCH 4/5] fix test --- pvnet/models/multimodal/linear_networks/networks.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pvnet/models/multimodal/linear_networks/networks.py b/pvnet/models/multimodal/linear_networks/networks.py index 0009afa0..e29211ae 100644 --- a/pvnet/models/multimodal/linear_networks/networks.py +++ b/pvnet/models/multimodal/linear_networks/networks.py @@ -1,5 +1,5 @@ """Linear networks used for the fusion model""" -from torch import nn +from torch import nn, rand from pvnet.models.multimodal.linear_networks.basic_blocks import ( AbstractLinearNetwork, @@ -316,6 +316,7 @@ def __init__( virtual_batch_size=virtual_batch_size, momentum=momentum, mask_type=mask_type, + group_attention_matrix=rand(4, in_features) ) self.activation = nn.LeakyReLU(negative_slope=0.01) diff --git a/pyproject.toml b/pyproject.toml index c0233394..0a066326 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "ipykernel", "h5netcdf", "torch>=2.0.0", - "pytorch_lightning==2.3.0", + "lightning", "torchvision", "pytest", "pytest-cov", From d078a798b293536b8094f5d295eb5044601a68e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:38:18 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvnet/models/multimodal/linear_networks/networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvnet/models/multimodal/linear_networks/networks.py b/pvnet/models/multimodal/linear_networks/networks.py index e29211ae..69c21d82 100644 --- a/pvnet/models/multimodal/linear_networks/networks.py +++ b/pvnet/models/multimodal/linear_networks/networks.py @@ -316,7 +316,7 @@ def __init__( virtual_batch_size=virtual_batch_size, momentum=momentum, mask_type=mask_type, - group_attention_matrix=rand(4, in_features) + group_attention_matrix=rand(4, in_features), ) self.activation = nn.LeakyReLU(negative_slope=0.01)