Skip to content

Conversation

@aseembits93
Copy link
Contributor

@aseembits93 aseembits93 commented Apr 2, 2025

PR Type

  • Bug fix
  • Tests

Description

  • Increase thread pool workers from 1 to 2.

  • Correct candidate length calculation from new results.

  • Update test loop parameters dynamically.

  • Revert line profile test loop arguments to fixed values.


Changes walkthrough 📝

Relevant files
Bug fix
function_optimizer.py
Update candidate handling and test loop configuration.     

codeflash/optimization/function_optimizer.py

  • Changed ThreadPoolExecutor max_workers from 1 to 2.
  • Adjusted candidate length update to use line profiler results.
  • Updated logging to display added results count.
  • Modified test loop parameters to use variable value.
  • +5/-5     
    Tests
    test_runner.py
    Fix test runner loop parameters.                                                 

    codeflash/verification/test_runner.py

  • Hardcoded codeflash_min_loops to 1.
  • Hardcoded codeflash_max_loops to 1.
  • +2/-2     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @aseembits93 aseembits93 requested a review from alvin-r April 2, 2025 22:01
    @github-actions
    Copy link

    github-actions bot commented Apr 2, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Parameter Mismatch

    The pytest loop parameters in the run_and_parse_tests function use the same variable for both min and max loops. Verify if using pytest_min_loops for both is intentional.

    pytest_min_loops=pytest_min_loops,
    pytest_max_loops=pytest_min_loops,

    @github-actions
    Copy link

    github-actions bot commented Apr 2, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    pytest_target_runtime_seconds=testing_time,
    pytest_min_loops=1,
    pytest_max_loops=1,
    pytest_min_loops=pytest_min_loops,
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    we can skip these arguments here since these are actually not used and is hardcoded. This is giving the wrong indication to the reader of this code, about how many times this code loops

    @alvin-r alvin-r merged commit 17de10b into main Apr 2, 2025
    16 checks passed
    @aseembits93 aseembits93 deleted the line-profiler branch April 23, 2025 19:33
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    4 participants