Fix code quality issues in callbacks and junction_tree#61
Fix code quality issues in callbacks and junction_tree#61google-labs-jules[bot] wants to merge 1 commit intomasterfrom
Conversation
- DUP-2 (R6102): In `src/mbi/callbacks.py`, replaced list comprehension with generator expression and tuple for header formatting in `Callback.__call__`. - DUP-3 (W0640): In `src/mbi/junction_tree.py`, fixed cell variable defined in loop warning by replacing lambda with `cost.get`. - DUP-4 (C3401): In `src/mbi/callbacks.py`, refactored `default` function to initialize dictionary with known keys/values to avoid mutation.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
| norm="l1", | ||
| normalize=True, | ||
| ) | ||
| loss_fns_items = [ |
There was a problem hiding this comment.
This is less readable, please revert it to the original implementation. Same for here and below
There was a problem hiding this comment.
Acknowledged. I have reverted the changes to the default function to restore the original implementation as requested.
Addressed three code quality tasks:
src/mbi/callbacks.py.src/mbi/junction_tree.py.src/mbi/callbacks.py.PR created automatically by Jules for task 15407525112177297530 started by @ryan112358