-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature/276 new script file for testing framework #238
base: develop
Are you sure you want to change the base?
Feature/276 new script file for testing framework #238
Conversation
…github.com/IntelLabs/vdms into feature/276_new_script_file_for_testing_01
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Updating permissions for Results Job to add content: write to pass to CI_Coverage_compare.
Update CI.yml
Print out the log files created by the testing
Update run_all_tests.py to use python3
Attempt to check if the requirements are installed correctly
Target CPP Coverage: 64.1421% Target Python Coverage: 98.02% |
Target CPP Coverage: 64.1421% Target Python Coverage: 98.02% |
Target CPP Coverage: 64.1421% Target Python Coverage: 97.94% |
Target CPP Coverage: 64.1421% Target Python Coverage: 97.94% |
Target CPP Coverage: 64.2822% Target Python Coverage: 97.94% |
Target CPP Coverage: 64.2822% Target Python Coverage: 97.94% |
Target CPP Coverage: 64.2822% Target Python Coverage: 97.94% |
remote_function/functions/caption.py
Outdated
|
||
DEBUG_MODE = True |
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 DEBUG_MODE
always be true?
# https://github.com/opencv/opencv/blob/4.x/data/haarcascades/haarcascade_frontalface_default.xml | ||
"functions/files/haarcascade_frontalface_default.xml" | ||
) | ||
DEBUG_MODE = True |
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 DEBUG_MODE
be true by default?
src/QueryHandlerBase.cc
Outdated
@@ -22,6 +22,7 @@ QueryHandlerBase::QueryHandlerBase() | |||
void QueryHandlerBase::cleanup_query(const std::vector<std::string> &images, | |||
const std::vector<std::string> &videos) { | |||
try { | |||
std::cout << "cleanup_query() was called. Size of images: " << images.size() << ", size of videos: " << videos.size() << std::endl; |
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.
Please remove if only added for debug
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.
Done. Thank you.
face_cascade = cv2.CascadeClassifier( | ||
# This file is available from OpenCV 'data' directory at | ||
# https://github.com/opencv/opencv/blob/4.x/data/haarcascades/haarcascade_frontalface_default.xml | ||
haarcascade_frontalface_default_path | ||
) |
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.
Does setting this as a global variable make the tests fail? If not, my thoughts are it may be beneficial to keep it as a global variable.
face_cascade = cv2.CascadeClassifier( | ||
# This file is available from OpenCV 'data' directory at | ||
# https://github.com/opencv/opencv/blob/4.x/data/haarcascades/haarcascade_frontalface_default.xml | ||
haarcascade_frontalface_default_path | ||
) |
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.
Does setting this as a global variable make the tests fail? If not, my thoughts are it may be beneficial to keep it as a global variable. Any thoughts on this @rv355?
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.
I think @rolandoquesada moved it inside the function because he is using a dynamic functions
directory path. If the plan is to support a dynamic functions directory, we can keep it inside the function, otherwise global would be better.
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.
Hi, exactly. The idea is to support a dynamic functions directory. Thank you.
def set_face_cascade(functions_path): | ||
global face_cascade | ||
haarcascade_frontalface_default_path = os.path.join( | ||
functions_path, "files/haarcascade_frontalface_default.xml" |
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.
Let's avoid duplicating this file. Use file located user_defined_operations/functions/files/haarcascade_frontalface_default.xml
EXPECT_EQ(status1, 0); | ||
} | ||
|
||
TEST(BLOB, add_Blob) { | ||
Meta_Data *meta_obj = new Meta_Data(); | ||
// -blobs.push_back(meta_obj->read_blob(filename)); |
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.
// -blobs.push_back(meta_obj->read_blob(filename)); |
haarcascade_frontalface_default_path = os.path.join( | ||
functions_path, "files/haarcascade_frontalface_default.xml" | ||
) |
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.
Use existing file as mentioned previously
haarcascade_frontalface_default_path = os.path.join( | ||
functions_path, "files/haarcascade_frontalface_default.xml" | ||
) |
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.
Use existing file as mentioned previously.
face_cascade = cv2.CascadeClassifier( | ||
# This file is available from OpenCV 'data' directory at | ||
# https://github.com/opencv/opencv/blob/4.x/data/haarcascades/haarcascade_frontalface_default.xml | ||
haarcascade_frontalface_default_path | ||
) |
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 we set globally? Mentioned in previous comment
|
||
|
||
# Function to dynamically import a module given its full path | ||
def import_module_from_path(module_name, path): |
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.
@rolandoquesada, you pointed out the need to include functions and temporary directory paths for the test case remote UDF runs, as we are working with different temporary directory paths. Is it beneficial to do the same in the user-side code? That would mean allowing dynamic function paths and temporary file paths, adding another step for the user. I understand we use default paths, but the warning would suggest using alternate paths. If you think it would be better this way, we must update the wiki accordingly.
socket = context.socket(zmq.REP) | ||
socket.bind("tcp://*:" + str(settings["port"])) | ||
# Function to dynamically import a module given its full path | ||
def import_module_from_path(module_name, path): |
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.
Same comment as for remote functions. If these updates should be included for the user side code, then we should update the wiki accordingly.
frame_height = int(vs.get(4)) | ||
|
||
video = cv2.VideoWriter( | ||
opfilename, cv2.VideoWriter_fourcc(*"XVID"), 30, (frame_width, frame_height) |
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.
Please confirm that having XVID
fourcc will not cause issues with other file formats such as mp4
frame_height = int(vs.get(4)) | ||
|
||
video = cv2.VideoWriter( | ||
opfilename, cv2.VideoWriter_fourcc(*"XVID"), 30, (frame_width, frame_height) |
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.
Please confirm that having XVID
fourcc will not cause issues with other file formats such as mp4
No description provided.