From ef538a9dadf62a330f605ceae4c2700cf27e9da1 Mon Sep 17 00:00:00 2001 From: Irina Espejo Date: Fri, 8 Dec 2023 13:42:06 +0100 Subject: [PATCH] [DO-NOT-MERGE] Relaxed PyTorch lightning requirements (#7) * Update setup.cfg Relax PyTorch lightning requirements * Update setup.cfg * type ignore * Update tests.yaml --------- Co-authored-by: Irina Espejo Morales Co-authored-by: Dimitrios Christofidellis <72087885+christofid@users.noreply.github.com> --- .github/workflows/tests.yaml | 4 ++-- setup.cfg | 2 +- src/gt4sd_trainer/hf_pl/models/core.py | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6a4a2cb..0d24c67 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 @@ -46,4 +46,4 @@ jobs: - name: Test entry-points run: | gt4sd-trainer-hf-pl --help - gt4sd-pl-to-hf --help \ No newline at end of file + gt4sd-pl-to-hf --help diff --git a/setup.cfg b/setup.cfg index ff175d3..a396786 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,7 @@ install_requires = importlib-resources>=5.10.0 joblib>=1.1.0 numpy>=1.16.5 - pytorch_lightning<=1.9.5 + lightning>=2.0.0 pyyaml>=5.4.1 regex>=2.5.91 scikit-learn>=1.0.0 diff --git a/src/gt4sd_trainer/hf_pl/models/core.py b/src/gt4sd_trainer/hf_pl/models/core.py index bd8e7b0..866643f 100644 --- a/src/gt4sd_trainer/hf_pl/models/core.py +++ b/src/gt4sd_trainer/hf_pl/models/core.py @@ -74,9 +74,7 @@ def forward(self, x: Tensor) -> Tensor: # type: ignore """ return self.model(x).logits # type:ignore - def configure_optimizers( - self, - ) -> Dict[str, object]: + def configure_optimizers(self) -> Dict[str, object]: # type:ignore """Create and return the optimizer. Returns: output (dict of str: Any):