MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / truncate

Method truncate

eval/Math/Qwen25-Math/evaluation/python_executor.py:144–148  ·  view source on GitHub ↗
(s, max_length=400)

Source from the content-addressed store, hash-verified

142
143 @staticmethod
144 def truncate(s, max_length=400):
145 half = max_length // 2
146 if len(s) > max_length:
147 s = s[:half] + "..." + s[-half:]
148 return s
149
150 def batch_apply(self, batch_code):
151 all_code_snippets = self.process_generation_to_code(batch_code)

Callers 1

batch_applyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected