Skip to content
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

Feature/with level #399

Merged
merged 10 commits into from
Jun 6, 2024
Merged

Feature/with level #399

merged 10 commits into from
Jun 6, 2024

Conversation

blooop
Copy link
Collaborator

@blooop blooop commented Jun 6, 2024

Summary by Sourcery

This pull request introduces support for parameter levels in sweeps, adds a new example demonstrating this feature, and updates existing functions and tests to accommodate the new functionality.

  • New Features:
    • Introduced a new function p in bencher/variables/inputs.py to create parameter dictionaries with optional max_level.
    • Added a new example example_levels2.py demonstrating the use of with_level for parameter sweeps.
  • Enhancements:
    • Modified plot_sweep and convert_vars_to_params functions to support run_cfg and handle parameters with levels.
    • Updated example_custom_sweep2.py to use the new p function for defining input variables.
  • Tests:
    • Added a new test test_example_level2 in test_bench_examples.py to validate the example_levels2 functionality.

Copy link
Contributor

sourcery-ai bot commented Jun 6, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new feature to handle parameter levels in the benchmarking process. The changes include modifications to the plot_sweep and convert_vars_to_params methods to support the new functionality, the addition of helper functions, updates to example scripts, and new test cases.

File-Level Changes

Files Changes
bencher/bencher.py
bencher/variables/inputs.py
Enhanced parameter handling to support levels and added helper functions for parameter creation.
bencher/example/example_custom_sweep2.py
bencher/example/example_levels2.py
test/test_bench_examples.py
Updated examples and tests to demonstrate and validate the new parameter level feature.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @blooop - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 8 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

bencher/bencher.py Outdated Show resolved Hide resolved
bencher/bencher.py Outdated Show resolved Hide resolved
bencher/bencher.py Outdated Show resolved Hide resolved
bencher/bencher.py Outdated Show resolved Hide resolved
bencher/bencher.py Outdated Show resolved Hide resolved
bencher/variables/inputs.py Outdated Show resolved Hide resolved
bencher/variables/inputs.py Show resolved Hide resolved
bencher/example/example_custom_sweep2.py Show resolved Hide resolved
test/test_bench_examples.py Show resolved Hide resolved
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.08%. Comparing base (446b014) to head (d215966).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #399      +/-   ##
==========================================
+ Coverage   90.01%   90.08%   +0.06%     
==========================================
  Files          56       57       +1     
  Lines        3255     3277      +22     
==========================================
+ Hits         2930     2952      +22     
  Misses        325      325              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blooop blooop merged commit 2d3af3a into main Jun 6, 2024
5 checks passed
@blooop blooop deleted the feature/with_level branch June 6, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant