Skip to content

Commit

Permalink
Minor improvement to dataclass flatten_with_path.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 557824539
  • Loading branch information
hamzamerzic authored and ChexDev committed Aug 17, 2023
1 parent 3addcce commit d5bd8e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions chex/_src/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def _flatten_with_path(dcls):
path = []
keys = []
for k, v in sorted(dcls.__dict__.items()):
k = jax.tree_util.GetAttrKey(k)
path.append((k, v))
keys.append(k)
return path, keys
Expand Down

0 comments on commit d5bd8e9

Please sign in to comment.