@@ -63,13 +63,13 @@ def __init__(self, config, model, backend, **kwargs):
63
63
# if as_adaptor is turn on, we pass in the input args to the intervention
64
64
self .as_adaptor = kwargs ["as_adaptor" ] if "as_adaptor" in kwargs else False
65
65
if self .as_adaptor :
66
- logging .warn (
66
+ logging .warning (
67
67
"as_adaptor is turned on. This means the intervention will take "
68
68
"the input arguments of the intervening module as well."
69
69
)
70
70
self .model_has_grad = False
71
71
if self .use_fast :
72
- logging .warn (
72
+ logging .warning (
73
73
"Detected use_fast=True means the intervention location "
74
74
"will be static within a batch.\n \n In case multiple "
75
75
"location tags are passed only the first one will "
@@ -184,7 +184,7 @@ def __init__(self, config, model, backend, **kwargs):
184
184
if representation .group_key is not None :
185
185
_any_group_key = True
186
186
if self .config .sorted_keys is not None :
187
- logging .warn (
187
+ logging .warning (
188
188
"The key is provided in the config. "
189
189
"Assuming this is loaded from a pretrained module."
190
190
)
@@ -1879,7 +1879,7 @@ def forward(
1879
1879
actual model forward calls. It will use forward
1880
1880
hooks to do interventions.
1881
1881
1882
- In essense , sources will lead to getter hooks to
1882
+ In essence , sources will lead to getter hooks to
1883
1883
get activations. We will use these activations to
1884
1884
intervene on our base example.
1885
1885
@@ -1919,7 +1919,7 @@ def forward(
1919
1919
subspaces is a list of indices indicating which subspace will
1920
1920
this intervention target given an example in the batch.
1921
1921
1922
- An intervention could be initialized with subspace parition as,
1922
+ An intervention could be initialized with subspace partition as,
1923
1923
[[... subspace_1 ...], [... subspace_2 ...], [rest]]
1924
1924
1925
1925
An intervention may be targeting a specific partition.
@@ -1933,7 +1933,7 @@ def forward(
1933
1933
1934
1934
Only setter (where do_intervention is called) needs this field.
1935
1935
1936
- *We assume base and source targetting the same subspace for now.
1936
+ *We assume base and source targeting the same subspace for now.
1937
1937
*We assume only a single space is targeted for now (although 2d list is provided).
1938
1938
1939
1939
Since we now support group-based intervention, the number of sources
@@ -2182,7 +2182,7 @@ def _batch_process_unit_location(self, inputs):
2182
2182
Each location list in the raw input as,
2183
2183
2184
2184
[[i, j, ...], [m, n, ...], ...] batched
2185
- where i, j are the unit index, the outter
2185
+ where i, j are the unit index, the outer
2186
2186
list is for the batch
2187
2187
2188
2188
0 commit comments