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

Fix in PlanckianJitter default parameters #1795

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Jun 18, 2024

Summary by Sourcery

This pull request fixes the default parameters for the PlanckianJitter transform, ensuring that temperature limits are correctly set when not defined. It also enhances the readability of temperature constants and updates the transform to set default temperature limits based on the mode.

  • Bug Fixes:
    • Fixed the default parameters for the PlanckianJitter transform to handle cases where temperature limits are not defined.
  • Enhancements:
    • Improved the readability of temperature constants by adding underscores for thousands separators.
    • Updated the PlanckianJitter transform to set default temperature limits based on the mode if not explicitly provided.

Copy link
Contributor

sourcery-ai bot commented Jun 18, 2024

Reviewer's Guide by Sourcery

This pull request refactors the PlanckianJitter transform to improve readability and robustness. Key changes include updating constant values for readability, adding default temperature limits for different modes, and modifying the validate_temperature method to handle cases where temperature_limit is None. Additionally, the init method now casts temperature_limit to ensure type consistency.

File-Level Changes

Files Changes
albumentations/augmentations/transforms.py Refactored PlanckianJitter transform to improve readability and handle default temperature limits more robustly.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

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: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 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 to tell me if it was helpful.

albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
albumentations/augmentations/transforms.py Show resolved Hide resolved
@ternaus ternaus merged commit ec8cb70 into main Jun 18, 2024
17 checks passed
@ternaus ternaus deleted the fix_in_plancikan_jitter branch June 18, 2024 02:13
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