-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug - Cannot access attribute "replace" for class "c123" #4312
Comments
Hey, this is a known issue. To get around this inherit from from flax.struct import PyTreeNode
class c123(PyTreeNode):
variable1: int = 0
c123instance = c123(variable1=0).replace(variable1=1) |
And can't you, as devs, automatically inherit when class is wrapped? Would make sense. |
This is not possible.
No performance drop. |
This comment has been minimized.
This comment has been minimized.
Hey, not sure if it helps but directly using
|
Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried.
System information
pip show flax jax jaxlib
:Problem you have encountered:
Replace function in flax is shown as an error, as if it does not exist.
What you expected to happen:
The GUI shows no errors. It's quite annoying given that .replace is something to be called often.
Logs, error messages, etc:
Cannot access attribute "replace" for class "c123"
Attribute "replace" is unknownPylancereportAttributeAccessIssue
Steps to reproduce:
Whenever possible, please provide a minimal example.
Also, I would ask, how is
.replace
function working if it callsself
in it's implementation? To my knowledge and to Jax docs,self
should throw an error every time there is jit.The text was updated successfully, but these errors were encountered: