-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cleaned up SPatter #2385
Cleaned up SPatter #2385
Conversation
Reviewer's Guide by SourceryThe pull request refactors the Updated class diagram for Spatter transformclassDiagram
class Spatter {
-gauss_sigma: tuple[float, float] | float
-cutout_threshold: tuple[float, float] | float
-intensity: tuple[float, float] | float
-mode: Literal["rain", "mud"]
-color: tuple[int, ...] | None
+__init__(
gauss_sigma: tuple[float, float] | float,
cutout_threshold: tuple[float, float] | float,
intensity: tuple[float, float] | float,
mode: Literal["rain", "mud"],
color: tuple[int, ...] | None,
p: float
)
+apply(
img: np.ndarray,
**params: Any
) -> np.ndarray
+get_params_dependent_on_data(
data: dict[str, Any],
random_state: np.random.RandomState
) -> dict[str, Any]
}
class InitSchema {
-gauss_sigma: NonNegativeFloatRangeType
-cutout_threshold: ZeroOneRangeType
-intensity: ZeroOneRangeType
-mode: Literal["rain", "mud"]
-color: Sequence[int] | None
+check_color() Self
}
Spatter -- InitSchema : has a
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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 - here's some feedback:
Overall Comments:
- The removal of the Sequence type hint for
mode
andcolor
seems like a good simplification. - Consider adding a brief explanation in the commit message about why the
mode
andcolor
types were changed.
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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Refactor the Spatter augmentation to simplify color handling and remove the ability to select multiple modes.
Enhancements: