To follow up on @jakevdp's answer, a completely equivalent but perhaps slightly more elegant way of systematically pre-empting this issue in equinox is to assign a value directly in the attribute definition:
class MyClass(eqx.Module):
...
param: float = 0 # set to a placeholder to allow tracing
def __init__(self):
self.param = self._integral_moment(3)
...