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 theFeatureStore
.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 overridingTensorAttr.__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 toNone
.
- update(attr: TensorAttr) TensorAttr [source]
Updates an
TensorAttr
with set attributes from anotherTensorAttr
.