-
-
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
Deleted update_params #2267
Deleted update_params #2267
Conversation
Reviewer's Guide by SourceryThis PR refactors the Sequence diagram for updated parameter handling flowsequenceDiagram
participant T as Transform
participant P as Parameters
T->>T: __call__()
alt should_apply is true
T->>T: get_params()
T->>T: update_transform_params(params, data)
Note over T: Updates shape and transform-specific params
T->>T: apply_with_params(params)
T->>P: Apply transformation with updated params
end
Class diagram showing transform parameter handling changesclassDiagram
class Transform {
+__call__(*args, force_apply, **kwargs)
+get_params()
+update_transform_params(params, data)
+apply_with_params(params, *args, **kwargs)
-should_apply(force_apply)
}
class GaussNoise {
+mean_range: tuple
+per_channel: bool
+noise_scale_factor: float
}
GaussNoise --|> Transform
note for Transform "Removed deprecated update_params method
Merged functionality into update_transform_params"
note for GaussNoise "Removed deprecated var_limit and mean parameters"
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 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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Renamed
update_params_shape
toupdate_transform_params
and updated its docstring to reflect that it now updates parameters with both input shape and transform-specific parameters. Removed the deprecatedupdate_params
method and thevar_limit
andmean
parameters fromGaussNoise
.Enhancements:
update_transform_params
to include transform-specific parameters likeinterpolation
,fill
, andfill_mask
.Tests:
update_transform_params
instead ofupdate_params_shape
.