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

Method process_sample_strict

codegeex/data/processor.py:66–73  ·  view source on GitHub ↗

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

(self, sample: PromptSample)

Source from the content-addressed store, hash-verified

64 yield self.pad_seq(prompt_tokens, code_tokens, extra=sample.extra)
65
66 def process_sample_strict(self, sample: PromptSample) -> List[Dict[str, List[int]]]:
67 """
68 Instead of processing lazily, we turn the iterable into a list.
69 """
70 if sample is None:
71 return None
72
73 return list(self.process_sample(sample))
74
75 def process_sample_(self, sample) -> List[Dict[str, List[int]]]:
76 prompt_sample = self._preprocess(sample)

Callers 1

process_sample_Method · 0.95

Calls 1

process_sampleMethod · 0.95

Tested by

no test coverage detected