Skip to content

Commit

Permalink
Add ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sharanry committed Oct 27, 2024
1 parent cac38fe commit 8ce0d7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions probe_lens/probes.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from tqdm import tqdm
import torch
import torch.nn as nn
from tqdm.autonotebook import tqdm


class LinearProbe(nn.Module):
def __init__(self, input_dim, output_dim=1, device="cpu"):
super(LinearProbe, self).__init__()
super().__init__()
self.linear = nn.Linear(input_dim, output_dim, device=device)

def forward(self, x):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_probes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from probe_lens.probes import LinearProbe
import torch
import torch.nn as nn

from probe_lens.probes import LinearProbe


def test_linear_probe():
input_dim = 10
Expand Down

0 comments on commit 8ce0d7f

Please sign in to comment.