-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-9147] Make VideoIntelligence use PTransform on user-facing API #11464
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
Conversation
|
Run Java PreCommit |
1 similar comment
|
Run Java PreCommit |
jkff
left a comment
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.
Thanks! On to @chamikaramj .
|
|
||
| /** | ||
| * Base class for Video Intelligence transform. | ||
| * Base class for VideoIntelligence PTransform. |
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.
- PTransforms should almost never need inheritance; based on the usage of this class, it's not needed here either - the current base class serves only the purpose of storing configuration variables, but contains no functionality - these variables can just be packaged into a configuration object, and current subclasses of AnnotateVideo can derive from PTransform directly and each store this configuration object.
- Even if you decide to keep using inheritance, please at least make this class non-public.
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.
You're right that it wasn't necessary. I got rid of the inheritance.
| this.featureList = featureList; | ||
| } | ||
|
|
||
| @StartBundle |
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.
Should this be in @Setup instead?
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.
Moved, thanks for the tip
jkff
left a comment
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.
LGTM thanks!
|
@mwalenia Please resolve merge conflicts. |
|
Run Java PreCommit |
4fe0d53 to
d8baca4
Compare
|
Run Java PreCommit |
2 similar comments
|
Run Java PreCommit |
|
Run Java PreCommit |
|
Yes, feel free to merge. |
…pache#11464) [BEAM-9147] Make VideoIntelligence use PTransform on user-facing API
After the remark in #11261 I modified the code to be in line with the PTransform creation guide.
Thanks, @jkff for your keen eye!
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.