77from lightning .pytorch import Callback
88from ...utils import check_consistency
99from ...solver .physics_informed_solver import PINNInterface
10- from ...condition import DomainEquationCondition
1110
1211
1312class RefinementInterface (Callback , metaclass = ABCMeta ):
@@ -46,7 +45,8 @@ def on_train_start(self, trainer, solver):
4645 # check we have valid conditions names
4746 if self ._condition_to_update is None :
4847 self ._condition_to_update = [
49- name for name , cond in solver .problem .conditions .items ()
48+ name
49+ for name , cond in solver .problem .conditions .items ()
5050 if hasattr (cond , "domain" )
5151 ]
5252
@@ -64,7 +64,7 @@ def on_train_start(self, trainer, solver):
6464 # check solver
6565 if not isinstance (solver , PINNInterface ):
6666 raise RuntimeError (
67- f "Refinment strategies are currently implemented only "
67+ "Refinment strategies are currently implemented only "
6868 "for physics informed based solvers. Please use a Solver "
6969 "inheriting from 'PINNInterface'."
7070 )
@@ -92,7 +92,6 @@ def sample(self, current_points, condition_name, solver):
9292 """
9393 Samples new points based on the condition.
9494 """
95- pass
9695
9796 @property
9897 def dataset (self ):
0 commit comments