Add archive-guided mutation prompts via TreeSHAP#116
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
* Add parent-aware feature guidance * black * added meta data
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ead1c592d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.feature_guidance = guidance | ||
| if guidance: | ||
| self.feature_guidance_message = guidance.message | ||
| elif parent is None: | ||
| self.feature_guidance_message = "" |
There was a problem hiding this comment.
Clear stale guidance when parent guidance fails
In _update_feature_guidance, when compute_feature_guidance(...) returns None for a specific parent, the code only clears feature_guidance_message if parent is None. That means a parent-specific guidance failure leaves the previous message intact, and construct_prompt will append stale guidance to the mutation prompt for a different parent. This misguides mutations whenever guidance cannot be computed for a parent (e.g., insufficient training data or SHAP failure), so the guidance should be reset even when parent is provided.
Useful? React with 👍 / 👎.
Summary