Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
frankaging committed Aug 24, 2024
1 parent 46c827e commit 4b14b6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyvene/models/intervenable_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1563,17 +1563,17 @@ def hook_callback(model, args, kwargs, output=None):
else:
if not isinstance(self.interventions[key][0], types.FunctionType):
if intervention.is_source_constant:
intervened_representation = do_intervention(
raw_intervened_representation = do_intervention(
selected_output,
None,
intervention,
subspaces[key_i] if subspaces is not None else None,
)
# if isinstance(raw_intervened_representation, InterventionOutput):
# self.full_intervention_outputs.append(raw_intervened_representation)
# intervened_representation = raw_intervened_representation.output
# else:
# intervened_representation = raw_intervened_representation
if isinstance(raw_intervened_representation, InterventionOutput):
self.full_intervention_outputs.append(raw_intervened_representation)
intervened_representation = raw_intervened_representation.output
else:
intervened_representation = raw_intervened_representation
else:
intervened_representation = do_intervention(
selected_output,
Expand Down

0 comments on commit 4b14b6e

Please sign in to comment.