Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions essos/coils.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ def currents_scale(self, new_currents_scale):
# dofs_currents property and setter
@property
def dofs_currents(self):
# Sentinel leaf during PyTree traversal: pass through, don't scale.
if self._dofs_currents_raw is None or isinstance(self._dofs_currents_raw, bool):
return self._dofs_currents_raw
if self._dofs_currents is None:
dofs_currents = self.dofs_currents_raw / self.currents_scale
if not isinstance(dofs_currents, jax.core.Tracer):
Expand Down