Skip to content

Commit

Permalink
Fix (critical!) variable ordering bug
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Sep 13, 2024
1 parent 1927861 commit bb32b1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jaxls/_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def ordered_dict_items[T](
self,
var_type_mapping: dict[type[Var[Any]], T],
) -> list[tuple[type[Var[Any]], T]]:
return sorted(var_type_mapping.items(), key=lambda x: x[0])
return sorted(
var_type_mapping.items(), key=lambda x: self.order_from_type[x[0]]
)


@jdc.pytree_dataclass
Expand Down

0 comments on commit bb32b1c

Please sign in to comment.