-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helm: Enhance dataprep to support local embedding and getfile
- By setting TEI_EMBEDDING_ENDPOINT to empty and EMBED_MODEL to non-empty, data-prep can support local embedding. - Support getfile and delete URL Signed-off-by: Lianhao Lu <[email protected]>
- Loading branch information
Showing
8 changed files
with
111 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
34 changes: 34 additions & 0 deletions
34
helm-charts/common/data-prep/templates/tests/test-pod.yaml
This file contains 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{ include "data-prep.fullname" . }}-testpod | ||
labels: | ||
{{- include "data-prep.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
#"helm.sh/hook-delete-policy": "hook-succeeded, hook-failure" | ||
spec: | ||
containers: | ||
- name: curl | ||
#image: alpine/curl | ||
image: python:3.10.14 | ||
command: ['bash', '-c'] | ||
args: | ||
- | | ||
echo "test file" > /tmp/file1.txt; | ||
{{- with index .Values.service.ports 0 }} | ||
export port={{.port}}; | ||
{{- end }} | ||
max_retry=20; | ||
for ((i=1; i<=max_retry; i++)); do | ||
curl http://{{ include "data-prep.fullname" . }}:$port/v1/dataprep -sS --fail-with-body \ | ||
-X POST \ | ||
-H "Content-Type: multipart/form-data" \ | ||
-F "files=@/tmp/file1.txt" && break; | ||
sleep 10; | ||
done; | ||
if [ $i -gt $max_retry ]; then echo "dataprep test failed."; exit 1; fi | ||
restartPolicy: Never |
This file contains 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
This file contains 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