fix: improve handling of NaN values in evaluation metrics calculation!#224
Conversation
- Updated the evaluation workflow to handle NaN values when calculating the mean of metrics, ensuring that only valid mean values are included in the results. - This change enhances the robustness of the evaluation process by preventing NaN results from affecting the overall metrics.
|
Caution Review failedThe pull request is closed. WalkthroughThe evaluation workflow in .github/workflows/evaluation.yml updates metric averaging logic: it iterates over defined metrics, computes means with NaNs dropped, and only records a metric if its mean is not NaN. Missing columns remain excluded. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions Runner
participant Eval as Evaluation Step
participant DF as DataFrame
Dev->>GH: Push / PR triggers evaluation.yml
GH->>Eval: Run evaluation script
Eval->>DF: Load metrics data
loop For each metric
Eval->>DF: df[m].dropna().mean()
alt Mean is numeric
Eval->>Eval: Include metric in avgs
else Mean is NaN
Eval->>Eval: Skip metric
end
end
Eval-->>GH: Output filtered averages
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit