MCPcopy Create free account
hub / github.com/InternLM/InternLM / eval_code

Method eval_code

tools/pal_inference.py:105–106  ·  view source on GitHub ↗
(self, expr: str)

Source from the content-addressed store, hash-verified

103 exec(code_piece, self._global_vars)
104
105 def eval_code(self, expr: str) -> Any:
106 return eval(expr, self._global_vars)
107
108 def inject(self, var_dict: Dict[str, Any]) -> None:
109 for k, v in var_dict.items():

Callers 1

executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected