AttributeError isn't raised correctly from properties of linen modules #2537
Labels
Priority: P2 - no schedule
Best effort response and resolution. We have no plan to work on this at the moment.
System information
Any
flax==0.6.1, jax==0.3.23, jaxlib==0.3.22
3.10
N/A
N/A
Problem you have encountered:
Linen modules do not seem to report
AttributeError
s correctly for non-existent attributes accessed by properties. Instead, the raised error claims that the property itself does not exist.This issue doesn't seem to occur in linen module methods, and to the best of my knowledge, it doesn't occur with other types of errors in linen properties, such as with mismatched einsum indices.
What you expected to happen:
Properties in linen modules would ideally perform error reporting the same way as properties of ordinary classes. E.g.,
which gives
Steps to reproduce:
However, Linen modules do not perform error reporting correctly for properties:
Logs, error messages, etc:
Running the code immediately above gives
The text was updated successfully, but these errors were encountered: