diff --git a/rdagent/components/coder/model_coder/CoSTEER/evaluators.py b/rdagent/components/coder/model_coder/CoSTEER/evaluators.py index 38a8a5d42..330c90d60 100644 --- a/rdagent/components/coder/model_coder/CoSTEER/evaluators.py +++ b/rdagent/components/coder/model_coder/CoSTEER/evaluators.py @@ -47,8 +47,10 @@ def value_evaluator( prediction: torch.Tensor, target: torch.Tensor, ) -> Tuple[torch.Tensor, bool]: - if target is None or prediction is None: - return "No output generated from the model. No value evaluation conducted.", False + if prediction is None: + return "No output generated from the model. Skip value evaluation", False + elif target is None: + return "No ground truth output provided. Value evaluation not impractical", False else: # Calculate the mean absolute difference diff = torch.mean(torch.abs(target - prediction)).item()