-
Notifications
You must be signed in to change notification settings - Fork 165
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
Move algorithm-specific dependencies into class definition (optical flow) #327
Conversation
@@ -40,6 +37,9 @@ def __call__(self, old_frame=None, current_frame=None): | |||
|
|||
@ClassFactory.register(ClassType.OF, alias="LukasKanadeOF") | |||
class LukasKanade(BaseFilter, abc.ABC): | |||
import cv2 | |||
import numpy |
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.
numpy
is the basic dependency of Sedna.
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.
OK, I placed the numpy
import inside the class because I noticed that it is imported at the function level in the FedAvg
class. So I thought about following the same approach.
Anyway, I will move the import up to the module level.
please add the dependency |
Will do. |
It looks good to me.
|
…low). Signed-off-by: Vittorio Cozzolino <vittorio.cozzolino@huawei.com> Code linting. Signed-off-by: Vittorio Cozzolino <vittorio.cozzolino@huawei.com> Move numpy import to module level. Signed-off-by: Vittorio Cozzolino <vittorio.cozzolino@huawei.com> Add opencv-python to requirements.dev
/lgtm /assign @jaypume |
@JoeyHwong-gk: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jaypume The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Vittorio Cozzolino vittorio.cozzolino@huawei.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
Move algorithm-specific dependencies into the class definition for the optical flow module. This should lift the requirement to have extra dependencies in the KB image.
Which issue(s) this PR fixes:
Fixes #320