Skip to content

Commit

Permalink
potential breaking change: naming convention change
Browse files Browse the repository at this point in the history
  • Loading branch information
frankaging committed Feb 3, 2025
1 parent 8aa6d35 commit 7610e3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyvene/models/intervenable_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ def _get_representation_key(self, representation):
u = representation.unit
n = representation.max_number_of_units
if "." in c:
_c = c.replace(".", "_")
# string access for sure
key_proposal = f"comp.{c}.unit.{u}.nunit.{n}"
key_proposal = f"comp_{_c}_unit_{u}_nunit_{n}"
else:
key_proposal = f"layer.{l}.comp.{c}.unit.{u}.nunit.{n}"
key_proposal = f"layer_{l}_comp_{c}_unit_{u}_nunit_{n}"
if key_proposal not in self._key_collision_counter:
self._key_collision_counter[key_proposal] = 0
else:
Expand Down

0 comments on commit 7610e3c

Please sign in to comment.