google / flax

Flax is a neural network library for JAX that is designed for flexibility.

Home Page:https://flax.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Opaque error message

NeilGirdhar opened this issue · comments

I got this stack trace:

  File "/home/neil/src/cmm/cmm/encoding/foundation/module.py", line 64, in infer
    configuration) = self._infer_given_observation(collected_observation, prediction,
  File "/home/neil/src/flax/flax/linen/transforms.py", line 1003, in wrapped_fn
    return prewrapped_fn(self, *args, **kwargs)
  File "/home/neil/src/flax/flax/linen/module.py", line 340, in wrapped_module_method
    return self._call_wrapped_method(fun, args, kwargs)
  File "/home/neil/src/flax/flax/linen/module.py", line 633, in _call_wrapped_method
    y = fun(self, *args, **kwargs)
  File "/home/neil/src/cmm/cmm/encoding/foundation/module.py", line 335, in _infer_given_observation
    eir = infer_encoding_configuration(self, observation, prediction)
  File "/home/neil/src/flax/flax/linen/transforms.py", line 340, in wrapped_fn
    return trafo_fn(module_scopes, *args, **kwargs)
  File "/home/neil/src/flax/flax/core/lift.py", line 197, in wrapper
    y, out_variable_groups_xs_t = fn(
  File "/home/neil/src/flax/flax/core/lift.py", line 777, in inner
    grad_variables, other_variables = variable_groups
jax._src.traceback_util.UnfilteredStackTrace: ValueError: not enough values to unpack (expected 2, got 0)

Does it give any hint as to what I've done wrong?

I also wanted to suggest that this is a fairly opaque error message. Can it be improved?

Found it: I overrode __post_init__ in a module and forgot to call super. I guess that's a pretty rare thing to do, so no worries about the message.