-
Notifications
You must be signed in to change notification settings - Fork 22
extract logic for processing a candidate into a method for separation of concerns #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
| min_key = ranking[0] | ||
| else: | ||
| diff_lens_ranking = create_rank_dictionary_compact(diff_lens_list) | ||
| runtimes_ranking = create_rank_dictionary_compact(runtimes_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not remove comments unless have a good reason
|
its a large diff - the logic seems sound. but ensure that you change no behavior what so ever, otherwise we won't catch it until 2 months later. verify functional equivalence deeply by reading the previous and new and comparing them |
yeah agreed, I'm only doing these refactors in anticipation of the agentic workflows, the currently implementations makes it very hard |
PR Type
Enhancement
Description
Refactor candidate evaluation into helper methods
Add CandidateEvaluationContext dataclass
Improve trace ID handling utility
Streamline ranking and logging flow
Diagram Walkthrough
File Walkthrough
models.py
Add evaluation context for candidate processingcodeflash/models/models.py
function_optimizer.py
Refactor candidate evaluation into modular helperscodeflash/optimization/function_optimizer.py