MCPcopy Create free account
hub / github.com/huggingface/transformers / lmap

Function lmap

examples/seq2seq/utils.py:58–60  ·  view source on GitHub ↗

list(map(f, x))

(f: Callable, x: Iterable)

Source from the content-addressed store, hash-verified

56
57
58def lmap(f: Callable, x: Iterable) -> List:
59 """list(map(f, x))"""
60 return list(map(f, x))
61
62
63def calculate_bleu_score(output_lns, refs_lns, **kwargs) -> dict:

Callers 7

ids_to_clean_textMethod · 0.90
_generative_stepMethod · 0.90
encode_fileFunction · 0.70
src_lensMethod · 0.70
tgt_lensMethod · 0.70
assert_all_frozenFunction · 0.70

Calls

no outgoing calls