MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / format_code

Function format_code

accessory/eval_mm/utils/math_utils.py:15–20  ·  view source on GitHub ↗
(code_str: str)

Source from the content-addressed store, hash-verified

13
14
15def format_code(code_str: str):
16 code = 'def run_it():\n'
17 for line in code_str.split('\n'):
18 code += ' ' + line + '\n'
19 code += 'run_it()'
20 return code
21
22
23class CodeExecutor:

Callers 2

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected