File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
examples/rust_adaptive_sort Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 88import tempfile
99from pathlib import Path
1010from openevolve .evaluation_result import EvaluationResult
11+ import logging
12+ logger = logging .getLogger ("examples.rust_adaptive_sort.evaluator" )
13+
1114
1215
1316def evaluate (program_path : str ) -> EvaluationResult :
14- return asyncio .run (_evaluate (program_path ))
17+ result = asyncio .run (_evaluate (program_path ))
18+ if "error" in result .artifacts :
19+ logger .error (f"Error evaluating program: { result .artifacts ['error' ]} " )
20+ if "stderr" in result .artifacts :
21+ logger .error (f"Stderr: { result .artifacts ['stderr' ]} " )
22+ if "stdout" in result .artifacts :
23+ logger .error (f"Stdout: { result .artifacts ['stdout' ]} " )
24+ return result
1525
1626
1727async def _evaluate (program_path : str ) -> EvaluationResult :
You can’t perform that action at this time.
0 commit comments