forked from opea-project/GenAIExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Dynamic wait for lvm service in MultimodalQnA tests #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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2ff09e2
Adds dynamic wait to MMQnA tests
mhbuehler 8079628
Fix for empty grep result
mhbuehler ba8b0f0
Adjusted test for gaudi
mhbuehler e62695a
Fixed for Gaudi service check
mhbuehler e8afc1b
Added warning to check_service_ready function
mhbuehler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,6 +18,24 @@ export image_fn="apple.png" | |||||
| export video_fn="WeAreGoingOnBullrun.mp4" | ||||||
| export caption_fn="apple.txt" | ||||||
|
|
||||||
| function check_service_ready() { | ||||||
| local container_name="$1" | ||||||
| local max_retries="$2" | ||||||
| local log_string="$3" | ||||||
|
|
||||||
| for i in $(seq 1 "$max_retries") | ||||||
| do | ||||||
| service_logs=$(docker logs "$container_name" 2>&1 | grep "$log_string" || true) | ||||||
| if [[ -z "$service_logs" ]]; then | ||||||
| echo "The $container_name service is not ready yet, sleeping 30s..." | ||||||
| sleep 30s | ||||||
| else | ||||||
| echo "$container_name service is ready" | ||||||
| break | ||||||
| fi | ||||||
| done | ||||||
| } | ||||||
|
|
||||||
| function build_docker_images() { | ||||||
| cd $WORKPATH/docker_image_build | ||||||
| git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../ | ||||||
|
|
@@ -201,7 +219,13 @@ function validate_microservices() { | |||||
| "retriever-multimodal-redis" \ | ||||||
| "{\"text\":\"test\",\"embedding\":${your_embedding}}" | ||||||
|
|
||||||
| sleep 3m | ||||||
| echo "Wait for tgi-llava-gaudi-server service to be ready" | ||||||
| check_service_ready "tgi-llava-gaudi-server" 10 "Connected" | ||||||
|
|
||||||
| if [[ $i -ge 10 ]]; then | ||||||
| echo "WARNING: Max retries reached when waiting for the lvm-llava service to be ready" | ||||||
| docker logs lvm-llava >> ${LOG_PATH}/lvm_llava_file.log | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| fi | ||||||
|
|
||||||
| # llava server | ||||||
| echo "Evaluating LLAVA tgi-gaudi" | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.