MCPcopy Create free account
hub / github.com/Hzfinfdu/Diffusion-BERT / add_original_src_length

Method add_original_src_length

dataloader.py:64–67  ·  view source on GitHub ↗
(self, example, tokenizer)

Source from the content-addressed store, hash-verified

62 return dataset
63
64 def add_original_src_length(self, example, tokenizer):
65 return {
66 'original_src_length': len(tokenizer.encode(example['src'], max_length=128, truncation=True, add_special_tokens=False))
67 }
68
69 def my_load(self, splits):
70 return [self._load(name) for name in splits]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected