Skip to content
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

Explicitly export "struct" from module "flax". #3249

Closed
wants to merge 1 commit into from

Commits on Sep 26, 2023

  1. Explicitly export "struct" from module "flax".

    This allows the following:
    ```
    import flax
    
    @flax.struct.dataclass
    class C: ...
    ```
    
    The current usages of the above pattern in flax only work
    accidentally because there already are imports for "flax.struct"
    in other files.
    
    See also https://docs.python.org/3/reference/simple_stmts.html#the-import-statement
    
    PiperOrigin-RevId: 552452298
    Flax Team committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    deca5e8 View commit details
    Browse the repository at this point in the history