Skip to content

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.

@copybara-service copybara-service bot force-pushed the test_679881642 branch 3 times, most recently from 7de8b3d to 504cd3e Compare September 30, 2024 17:10
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: 680626207
@copybara-service copybara-service bot merged commit 62a6a25 into main Sep 30, 2024
1 of 3 checks passed
@copybara-service copybara-service bot deleted the test_679881642 branch September 30, 2024 17:19
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