add package dependency missed by auto-inspection 03/1303/2
authorEric Z <ezavesky@research.att.com>
Wed, 14 Mar 2018 14:29:31 +0000 (09:29 -0500)
committerEric Z <ezavesky@research.att.com>
Wed, 14 Mar 2018 14:29:31 +0000 (09:29 -0500)
- explicit opencv package required because of nested in-class usage

Change-Id: I0daf90fb98219de59aa4bc2f81803b9067bd7dd2
Signed-off-by: Eric Z <ezavesky@research.att.com>
Issue-ID: ACUMOS-390

face_privacy_filter/filter_image.py

index 8dd1890..13f8a23 100644 (file)
@@ -57,8 +57,10 @@ def model_create_pipeline(transformer, funcName):
     package_path = path.dirname(path.realpath(__file__))
     objModelDeclare = {}
     objModelDeclare[funcName] = predict_class
-    return Model(**objModelDeclare), Requirements(packages=[package_path], reqs=[pd, np, sklearn],
-                                                        req_map={cv2: 'opencv-python'})
+    # add the model dependency manually because of the way we constructed the package;
+    # the opencv-python/cv2 dependency is not picked up automagically
+    return Model(**objModelDeclare), Requirements(packages=[package_path], reqs=[pd, np, sklearn, 'opencv-python'],
+                                                  req_map={cv2: 'opencv-python'})
 
 
 def main(config={}):