MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / process_sample_strict

Method process_sample_strict

codegeex/data/processor.py:143–150  ·  view source on GitHub ↗

Instead of processing lazily, we turn the iterable into a list.

(self, sample: LabelSample)

Source from the content-addressed store, hash-verified

141 yield self.pad_seq(prompt_tokens, label, extra=sample.extra)
142
143 def process_sample_strict(self, sample: LabelSample) -> List[Dict[str, List[int]]]:
144 """
145 Instead of processing lazily, we turn the iterable into a list.
146 """
147 if sample is None:
148 return None
149
150 return list(self.process_sample(sample))
151
152 def process_sample_(self, sample) -> List[Dict[str, List[int]]]:
153 prompt_sample = self._preprocess(sample)

Callers 1

process_sample_Method · 0.95

Calls 1

process_sampleMethod · 0.95

Tested by

no test coverage detected