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

Revert add array to opencv #43

Merged
merged 3 commits into from
Oct 30, 2024
Merged

Revert add array to opencv #43

merged 3 commits into from
Oct 30, 2024

Conversation

ternaus
Copy link
Contributor

@ternaus ternaus commented Oct 30, 2024

Summary by Sourcery

Revert the addition of the add_array_simsimd function and refactor the add_opencv function for better handling of uint8 images with specific value types. Update benchmark results to use 500 images, providing a more comprehensive performance analysis across different operations and data types.

Enhancements:

  • Refactor the add_opencv function to improve handling of uint8 images with negative scalar values or non-uint8 array values.

Tests:

  • Update benchmark results to reflect performance changes with 500 images instead of 10, across various operations and data types.

Copy link
Contributor

sourcery-ai bot commented Oct 30, 2024

Reviewer's Guide by Sourcery

This PR reverts changes to the OpenCV array addition implementation and updates benchmark results. The main change simplifies the conditional logic in the add_opencv function and removes the simsimd-based array addition implementation.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Simplified conditional logic in add_opencv function
  • Consolidated multiple if conditions into a single needs_float boolean variable
  • Removed separate type-based conditional branches
  • Simplified float32 conversion logic
albucore/functions.py
Removed simsimd-based array addition implementation
  • Removed conditional check for matching dtypes
  • Removed call to add_array_simsimd function
  • Defaulted to using add_opencv for all array additions
albucore/functions.py
Updated benchmark results with new measurements
  • Increased number of test images from 10 to 500 for more accurate results
  • Updated performance metrics across all benchmark categories
  • Updated package version from 0.0.17 to 0.0.19
  • Added new benchmark result files for various operations
benchmark/albucore_benchmark/results/uint8_1/*.md
benchmark/albucore_benchmark/results/float32_1/*.md
benchmark/albucore_benchmark/results/float32_3/*.md
benchmark/albucore_benchmark/results/uint8_3/*.md

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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 @ternaus - I've reviewed your changes and they look great!

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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@8b309b4). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage        ?   57.93%           
=======================================
  Files           ?       20           
  Lines           ?     2223           
  Branches        ?        0           
=======================================
  Hits            ?     1288           
  Misses          ?      935           
  Partials        ?        0           

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

@ternaus ternaus merged commit f5eb6c6 into main Oct 30, 2024
16 checks passed
@ternaus ternaus deleted the revert_add_array_to_opencv branch October 30, 2024 00:15
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.

2 participants