Skip to content

Commit db57111

Browse files
committed
Remove debug_info
1 parent 731de15 commit db57111

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/torchjd/sparse/_aten_function_overrides/shape.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def cat_default(tensors: list[Tensor], dim: int) -> Tensor:
124124
if any(not torch.equal(t.basis, ref_basis) for t in tensors_[1:]):
125125
raise NotImplementedError(
126126
"Override for aten.cat.default does not support SLTs that do not all have the same "
127-
f"basis. Found the following tensors:\n{[t.debug_info() for t in tensors_]} and the "
128-
f"following dim: {dim}."
127+
f"basis. Found the following tensors:\n{[repr(t) for t in tensors_]} and the following "
128+
f"dim: {dim}."
129129
)
130130

131131
# We need to try to find the (pretty sure it either does not exist or is unique) physical

src/torchjd/sparse/_sparse_latticed_tensor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ def __torch_dispatch__(cls, func, types, args=(), kwargs=None):
105105
def __repr__(self, *, tensor_contents=None) -> str:
106106
return f"SparseLatticedTensor(physical={self.physical}, basis={self.basis})"
107107

108-
def debug_info(self) -> str:
109-
info = f"vshape: {self.shape}\n" f"pshape: {self.physical.shape}\n" f"basis: {self.basis}\n"
110-
return info
111-
112108
@classmethod
113109
def implements(cls, torch_function):
114110
"""Register a torch function override for ScalarTensor"""

0 commit comments

Comments
 (0)