Implement Dataset, Dataloader and DataModule class and fix SupervisedSolver

This commit is contained in:
FilippoOlivo
2024-10-16 11:24:37 +02:00
committed by Nicola Demo
parent b9753c34b2
commit c9304fb9bb
30 changed files with 770 additions and 784 deletions

View File

@@ -22,11 +22,11 @@ class DataConditionInterface(ConditionInterface):
super().__init__()
self.input_points = input_points
self.conditional_variables = conditional_variables
self.condition_type = 'unsupervised'
self._condition_type = 'unsupervised'
def __setattr__(self, key, value):
if (key == 'input_points') or (key == 'conditional_variables'):
check_consistency(value, (LabelTensor, Graph, torch.Tensor))
DataConditionInterface.__dict__[key].__set__(self, value)
elif key in ('problem', 'condition_type'):
elif key in ('_problem', '_condition_type'):
super().__setattr__(key, value)