torch_geometric.data.TensorAttr

class TensorAttr(group_name: Optional[str] = FieldStatus.UNSET, attr_name: Optional[str] = FieldStatus.UNSET, index: Optional[Union[Tensor, ndarray, slice, int]] = FieldStatus.UNSET)[source]

Bases: CastMixin

Defines the attributes of a FeatureStore tensor. It holds all the parameters necessary to uniquely identify a tensor from the FeatureStore.

Note that the order of the attributes is important; this is the order in which attributes must be provided for indexing calls. FeatureStore implementations can define a different ordering by overriding TensorAttr.__init__().

is_set(key: str) bool[source]

Whether an attribute is set in TensorAttr.

is_fully_specified() bool[source]

Whether the TensorAttr has no unset fields.

fully_specify() TensorAttr[source]

Sets all UNSET fields to None.

update(attr: TensorAttr)[source]

Updates an TensorAttr with set attributes from another TensorAttr.