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

Method __init__

eval/Math/Qwen25-Math/evaluation/python_executor.py:76–89  ·  view source on GitHub ↗
(
        self,
        runtime: Optional[Any] = None,
        get_answer_symbol: Optional[str] = None,
        get_answer_expr: Optional[str] = None,
        get_answer_from_stdout: bool = False,
        timeout_length: int = 5,
    )

Source from the content-addressed store, hash-verified

74
75class PythonExecutor:
76 def __init__(
77 self,
78 runtime: Optional[Any] = None,
79 get_answer_symbol: Optional[str] = None,
80 get_answer_expr: Optional[str] = None,
81 get_answer_from_stdout: bool = False,
82 timeout_length: int = 5,
83 ) -> None:
84 self.runtime = runtime if runtime else GenericRuntime()
85 self.answer_symbol = get_answer_symbol
86 self.answer_expr = get_answer_expr
87 self.get_answer_from_stdout = get_answer_from_stdout
88 self.pool = Pool(multiprocess.cpu_count())
89 self.timeout_length = timeout_length
90
91 def process_generation_to_code(self, gens: str):
92 return [g.strip().split('\n') for g in gens]

Callers

nothing calls this directly

Calls 1

GenericRuntimeClass · 0.85

Tested by

no test coverage detected