Change subfunction signature to ignore value

Instead of marking `value` for deletion by doing
```py
del value  # Unused.
```

ignore the variable in the function signature.
This commit is contained in:
Aareon Sullivan 2024-03-22 19:16:58 -05:00 committed by GitHub
parent 7050ed204b
commit 9024770ce8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,9 +90,7 @@ def ffn_size(emb_size, widening_factor):
def apply_rules(rules): def apply_rules(rules):
def _apply_rules(path, value): def _apply_rules(path, _):
del value # Unused.
path_list = [str(i.key).split("/") for i in path if isinstance(i, jax.tree_util.DictKey)] path_list = [str(i.key).split("/") for i in path if isinstance(i, jax.tree_util.DictKey)]
flattened_path = jax.tree_util.tree_flatten(path_list)[0] flattened_path = jax.tree_util.tree_flatten(path_list)[0]