Black formatting on condition

This commit is contained in:
FilippoOlivo
2025-03-11 16:46:11 +01:00
committed by Nicola Demo
parent 56e45c6c87
commit 62b4cb023c
4 changed files with 7 additions and 7 deletions

View File

@@ -41,13 +41,13 @@ class ConditionInterface(metaclass=ABCMeta):
@staticmethod @staticmethod
def _check_graph_list_consistency(data_list): def _check_graph_list_consistency(data_list):
""" """
Check if the list of :class:`torch_geometric.data.Data`/:class:`Graph` Check if the list of :class:`torch_geometric.data.Data`/:class:`Graph`
objects is consistent. objects is consistent.
:param data_list: List of graph type objects. :param data_list: List of graph type objects.
:type data_list: list(torch_geometric.data.Data) | list(Graph) :type data_list: list(torch_geometric.data.Data) | list(Graph)
:raises ValueError: Input data must be either torch_geometric.data.Data :raises ValueError: Input data must be either torch_geometric.data.Data
or Graph objects. or Graph objects.
:raises ValueError: All elements in the list must have the same keys. :raises ValueError: All elements in the list must have the same keys.
:raises ValueError: Type mismatch in data tensors. :raises ValueError: Type mismatch in data tensors.

View File

@@ -26,7 +26,7 @@ class DataCondition(ConditionInterface):
types of input data. types of input data.
:param input: Input data for the condition. :param input: Input data for the condition.
:type input: torch.Tensor | LabelTensor | Graph | \ :type input: torch.Tensor | LabelTensor | Graph |
torch_geometric.data.Data torch_geometric.data.Data
:param conditional_variables: Conditional variables for the condition. :param conditional_variables: Conditional variables for the condition.
:type conditional_variables: torch.Tensor | LabelTensor :type conditional_variables: torch.Tensor | LabelTensor

View File

@@ -33,7 +33,7 @@ class InputEquationCondition(ConditionInterface):
:rtype: InputTensorEquationCondition | InputGraphEquationCondition :rtype: InputTensorEquationCondition | InputGraphEquationCondition
:raises ValueError: If input is not of type :class:`torch.Tensor`, :raises ValueError: If input is not of type :class:`torch.Tensor`,
:class:`LabelTensor`, :class:`Graph`, or :class:`LabelTensor`, :class:`Graph`, or
:class:`torch_geometric.data.Data`. :class:`torch_geometric.data.Data`.
""" """
@@ -67,8 +67,8 @@ class InputEquationCondition(ConditionInterface):
.. note:: .. note::
If ``input`` is composed by a list of :class:`Graph`/ If ``input`` is composed by a list of :class:`Graph`/
:class:`torch_geometric.data.Data` objects, all elements must have :class:`torch_geometric.data.Data` objects, all elements must have
the same structure (keys and data types). Moreover, at least one the same structure (keys and data types). Moreover, at least one
attribute must be a :class:`LabelTensor`. attribute must be a :class:`LabelTensor`.
""" """

View File

@@ -87,7 +87,7 @@ class InputTargetCondition(ConditionInterface):
.. note:: .. note::
If either ``input`` or ``target`` are composed by a list of If either ``input`` or ``target`` are composed by a list of
:class:`Graph`/:class:`torch_geometric.data.Data` objects, all :class:`Graph`/:class:`torch_geometric.data.Data` objects, all
elements must have the same structure (keys and data types) elements must have the same structure (keys and data types)
""" """