Skip to content

Commit e5aa176

Browse files
committed
formatting
1 parent 9c9053b commit e5aa176

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

scripts/benchmark.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ def plot(results: pathlib.Path):
291291
alt.renderers.enable("png")
292292

293293
df = (
294-
pl
295-
.read_json(results)
294+
pl.read_json(results)
296295
.select("results")
297296
.explode("results")
298297
.unnest("results")
@@ -302,8 +301,7 @@ def plot(results: pathlib.Path):
302301
title = str(results.parent)
303302

304303
band = (
305-
alt
306-
.Chart(df)
304+
alt.Chart(df)
307305
.mark_errorband(extent="stdev") # mean +/- 1 stddev
308306
.encode(
309307
alt.X("n_workers", type="quantitative"),
@@ -315,8 +313,7 @@ def plot(results: pathlib.Path):
315313
)
316314

317315
line = (
318-
alt
319-
.Chart(df, title=title)
316+
alt.Chart(df, title=title)
320317
.mark_line(point=True)
321318
.encode(
322319
alt.X("n_workers", type="quantitative"),

src/saev/data/bird_mae.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ def _init_weights(self, module: nn.Module) -> None:
443443
def forward(
444444
self, input_values: Float[Tensor, "batch 1 512 128"]
445445
) -> dict[str, Tensor]:
446-
447446
bsz, c, w, h = input_values.shape
448447
assert c == 1
449448
assert w == self.cfg.img_size_x

tests/test_nn_modeling.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ def sae_cfgs_comprehensive():
3434
activation_strategy = st.one_of(relu_strategy, topk_strategy, batch_topk_strategy)
3535

3636
return st.builds(
37-
lambda d_model, expansion, seed, normalize_w_dec, remove_parallel_grads, activation: (
37+
lambda d_model,
38+
expansion,
39+
seed,
40+
normalize_w_dec,
41+
remove_parallel_grads,
42+
activation: (
3843
modeling.SparseAutoencoderConfig(
3944
d_model=d_model,
4045
d_sae=d_model * expansion,

0 commit comments

Comments
 (0)