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/over time limited #512

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Feature/over time limited #512

wants to merge 17 commits into from

Conversation

blooop
Copy link
Owner

@blooop blooop commented Jan 31, 2025

Summary by Sourcery

Add support for sampling over time and reduce the number of float variables in the meta example.

New Features:

  • Added sample_over_time parameter to enable sampling benchmarks over time.

Tests:

  • Updated meta example benchmarks to include the sample_over_time parameter and reduced the number of float variables.

Copy link
Contributor

sourcery-ai bot commented Jan 31, 2025

Reviewer's Guide by Sourcery

This pull request introduces the ability to sample over time and adds a new example to showcase this functionality. It also modifies the naming convention of the generated example notebooks to include the sample with repeats and over time parameters.

Class diagram showing BenchRunCfg changes

classDiagram
    class BenchRunCfg {
        +int repeats
        +int level
        +bool over_time
    }
    note for BenchRunCfg "Added over_time parameter"
Loading

Flow diagram showing notebook generation process

flowchart TD
    A[Start] --> B[Generate title]
    B --> C{sample_over_time?}
    C -->|Yes| D[Add '_over_time' to title]
    C -->|No| E[Keep title as is]
    D --> F[Create notebook]
    E --> F
    F --> G[Write notebook to file]
    G --> H[End]
Loading

File-Level Changes

Change Details Files
Added the ability to sample over time
  • Added a sample_over_time parameter to the BenchRunCfg class.
  • Modified the title of the generated notebooks to include the sample_over_time parameter.
  • Added a new example example_meta_over_time to showcase the new functionality.
bencher/example/meta/generate_meta.py
Modified the naming convention of the generated example notebooks
  • Modified the title of the generated notebooks to include the sample_with_repeats parameter.
bencher/example/meta/generate_meta.py
Added a new example to showcase the over time functionality
  • Added a new function example_meta_over_time that uses the sample_over_time parameter.
  • Added a call to the new example in the if __name__ == '__main__': block.
bencher/example/meta/generate_meta.py
Updated the generated example notebooks
  • Regenerated the example notebooks to include the new naming convention and over time parameter.
docs/reference/meta/ex_0_float_3_cat.ipynb
docs/reference/meta/ex_1_float_3_cat.ipynb
docs/reference/meta/ex_1_float_0_cat.ipynb
docs/reference/meta/ex_0_float_2_cat.ipynb
docs/reference/meta/ex_0_float_0_cat.ipynb
docs/reference/meta/ex_0_float_1_cat.ipynb
docs/reference/meta/ex_0_float_0_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_0_float_1_cat_1_repeats.ipynb
docs/reference/meta/ex_0_float_1_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_0_float_1_cat_20_repeats_over_time.ipynb
docs/reference/meta/ex_0_float_2_cat_1_repeats.ipynb
docs/reference/meta/ex_0_float_2_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_0_float_2_cat_20_repeats.ipynb
docs/reference/meta/ex_0_float_2_cat_20_repeats_over_time.ipynb
docs/reference/meta/ex_0_float_3_cat_1_repeats.ipynb
docs/reference/meta/ex_0_float_3_cat_20_repeats.ipynb
docs/reference/meta/ex_1_float_0_cat_1_repeats.ipynb
docs/reference/meta/ex_1_float_0_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_1_float_0_cat_20_repeats_over_time.ipynb
docs/reference/meta/ex_1_float_1_cat_1_repeats.ipynb
docs/reference/meta/ex_1_float_1_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_1_float_1_cat_20_repeats.ipynb
docs/reference/meta/ex_1_float_1_cat_20_repeats_over_time.ipynb
docs/reference/meta/ex_1_float_2_cat_1_repeats.ipynb
docs/reference/meta/ex_1_float_2_cat_1_repeats_over_time.ipynb
docs/reference/meta/ex_1_float_2_cat_20_repeats.ipynb
docs/reference/meta/ex_1_float_2_cat_20_repeats_over_time.ipynb
docs/reference/meta/ex_2_float_0_cat_20_repeats.ipynb
docs/reference/meta/ex_2_float_1_cat_1_repeats.ipynb
docs/reference/meta/ex_2_float_2_cat_1_repeats.ipynb
docs/reference/meta/ex_2_float_2_cat_20_repeats.ipynb
docs/reference/meta/ex_2_float_3_cat_1_repeats.ipynb
docs/reference/meta/ex_2_float_3_cat_20_repeats.ipynb
Removed unused example notebooks
  • Removed the old example notebooks.
docs/reference/meta/ex_1_float_1_cat.ipynb
docs/reference/meta/ex_1_float_2_cat.ipynb
docs/reference/meta/ex_2_float_0_cat.ipynb
docs/reference/meta/ex_2_float_1_cat.ipynb
docs/reference/meta/ex_2_float_2_cat.ipynb
docs/reference/meta/ex_2_float_3_cat.ipynb
docs/reference/meta/ex_3_float_0_cat.ipynb
docs/reference/meta/ex_3_float_1_cat.ipynb
docs/reference/meta/ex_3_float_2_cat.ipynb
docs/reference/meta/ex_3_float_3_cat.ipynb
Added a script to clean the pixi environment
  • Added a script to clean the pixi environment.
scripts/clean_pixi.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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 - here's some feedback:

Overall Comments:

  • Consider adding the generated notebook files under docs/reference/meta/ to .gitignore since they are build artifacts that can be regenerated.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: 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 and I'll use the feedback to improve your reviews.

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.

1 participant