Skip to content

Commit

Permalink
Fix doc string for zeta filter
Browse files Browse the repository at this point in the history
  • Loading branch information
norabelrose committed May 12, 2024
1 parent 8b3812a commit f4149d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion w2s/knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def knn_average(x: torch.Tensor, y: torch.Tensor, k: int):


def zeta_filter(x: torch.Tensor, y: torch.Tensor, k: int, q: float = 0.5):
"""Compute average of `y` of `k` nearest neighbors of `x`."""
"""Remove points whose labels are far the average of their neighbors' labels."""

# Number of points to return
n = round(q * len(x))
Expand Down
1 change: 0 additions & 1 deletion w2s/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ def strong_processor(examples):
)
trainer.train()
wandb.finish()
move_best_ckpt(trainer)


if __name__ == "__main__":
Expand Down

0 comments on commit f4149d6

Please sign in to comment.