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

Fix false positive tracer leaks in flax library. #4232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Fix false positive tracer leaks in flax library.

We'd like flax itself never to accidentally trigger the jax leak detector when enabled,
but over the years a few longer-lived temporaries were introduced to the flax codebase
that do trigger it. We remedy those cases:

  • in flax.core remove a redundant use of nonlocal scopes in pack implementation.
  • for nn.jit have the hashing helper datastructure maintain a weakref to module.
  • explicitly exempt a context capture used in module summary tabulation routine.

We'd like flax itself never to accidentally trigger the jax leak detector when enabled,
but over the years a few longer-lived temporaries were introduced to the flax codebase
that do trigger it.  We remedy those cases:

- in flax.core remove a redundant use of nonlocal scopes in pack implementation.
- for nn.jit have the hashing helper datastructure maintain a weakref to module.
- explicitly exempt a context capture used in module summary tabulation routine.

PiperOrigin-RevId: 679881642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant