Skip to content

Commit

Permalink
remove obsolete function
Browse files Browse the repository at this point in the history
  • Loading branch information
willdumm committed Feb 20, 2025
1 parent f2299c5 commit 42ee21c
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions netam/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,32 +333,6 @@ def chunked(iterable, n):
yield chunk


def assume_single_sequence_is_heavy_chain(seq_arg_idx=0):
"""Wraps a function that takes a heavy/light sequence pair as its first argument and
returns a tuple of results.
The wrapped function will assume that if the first argument is a string, it is a
heavy chain sequence, and in that case will return only the heavy chain result.
"""

def decorator(function):
@wraps(function)
def wrapper(*args, **kwargs):
seq = args[seq_arg_idx]
if isinstance(seq, str):
seq = (seq, "")
args = list(args)
args[seq_arg_idx] = seq
res = function(*args, **kwargs)
return res[0]
else:
return function(*args, **kwargs)

return wrapper

return decorator


def heavy_chain_shim(paired_evaluator):
"""Returns a function that evaluates only heavy chains given a paired evaluator."""

Expand Down

0 comments on commit 42ee21c

Please sign in to comment.