fix compile issue (#627)

This commit is contained in:
Dario Coscia
2025-09-08 14:22:25 +02:00
committed by GitHub
parent efc9e327f6
commit 973d0c05ab
2 changed files with 40 additions and 1 deletions

View File

@@ -169,7 +169,10 @@ class SolverInterface(lightning.pytorch.LightningModule, metaclass=ABCMeta):
compile the model if the :class:`~pina.trainer.Trainer`
``compile`` is ``True``.
:param str stage: The current stage of the training process
(e.g., ``fit``, ``validate``, ``test``, ``predict``).
:return: The result of the parent class ``setup`` method.
:rtype: Any
"""
if stage == "fit" and self.trainer.compile:
self._setup_compile()