Currently, SymmetryLossWarning points to whest/_ndarray.py, which makes debugging difficult. It should point to the user call site instead.
Example:
import whest as we
sg = we.SymmetryGroup
with we.BudgetContext(flop_budget=1e20) as bc:
n = 10
with we.namespace('init'):
A = we.random.randn(n, n, n)
B = we.random.randn(n, n, n)
# A = we.symmetrize(A, symmetry=sg.cyclic(axes=(0, 1, 2)))
A = we.symmetrize(A, symmetry=sg.symmetric(axes=(0, 1)))
B = we.symmetrize(B, symmetry=sg.cyclic(axes=(0, 1, 2)))
with we.namespace('sum'):
X = A + B
gives
whest/src/whest/_ndarray.py:83: SymmetryLossWarning: Symmetry lost along dims (0, 1), (0, 1, 2): add — no symmetry groups shared by both operands. Use as_symmetric() to re-tag if you know the result is symmetric. Suppress with we.configure(symmetry_warnings=False).
return _me().add(self, other)
which is uninformative.
Currently, SymmetryLossWarning points to
whest/_ndarray.py, which makes debugging difficult. It should point to the user call site instead.Example:
gives
which is uninformative.