disable compilation py>=3.14

This commit is contained in:
Dario Coscia
2025-10-28 12:29:19 +01:00
committed by Giovanni Canali
parent 24d806b262
commit 64930c431f
3 changed files with 40 additions and 11 deletions

View File

@@ -174,11 +174,7 @@ class SolverInterface(lightning.pytorch.LightningModule, metaclass=ABCMeta):
:return: The result of the parent class ``setup`` method.
:rtype: Any
"""
if stage == "fit" and self.trainer.compile:
self._setup_compile()
if stage == "test" and (
self.trainer.compile and not self._is_compiled()
):
if self.trainer.compile and not self._is_compiled():
self._setup_compile()
return super().setup(stage)