Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions sample-workflows/basic_llm_workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,8 @@
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"type": "string",
"default": "Intel/neural-chat-7b-v3-3",
"options": [
{
"name": "Intel/neural-chat-7b-v3-3",
"label": "Intel/neural-chat-7b-v3-3"
},
{
"name": "Llama-2-7b-chat-hf",
"label": "Llama-2-7b-chat-hf"
},
{
"name": "Llama-2-70b-chat-hf",
"label": "Llama-2-70b-chat-hf"
},
{
"name": "Meta-Llama-3-8B-Instruct",
"label": "Meta-Llama-3-8B-Instruct"
},
{
"name": "Meta-Llama-3-70B-Instruct",
"label": "Meta-Llama-3-70B-Instruct"
},
{
"name": "Phi-3",
"label": "Phi-3"
}
],
"id": "opea_service@llm_tgi_0-input-modelName-options"
},
{
Expand Down
28 changes: 1 addition & 27 deletions sample-workflows/sample_workflow_chatqna.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,34 +361,8 @@
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"type": "string",
"default": "Intel/neural-chat-7b-v3-3",
"options": [
{
"name": "Intel/neural-chat-7b-v3-3",
"label": "Intel/neural-chat-7b-v3-3"
},
{
"name": "Llama-2-7b-chat-hf",
"label": "Llama-2-7b-chat-hf"
},
{
"name": "Llama-2-70b-chat-hf",
"label": "Llama-2-70b-chat-hf"
},
{
"name": "Meta-Llama-3-8B-Instruct",
"label": "Meta-Llama-3-8B-Instruct"
},
{
"name": "Meta-Llama-3-70B-Instruct",
"label": "Meta-Llama-3-70B-Instruct"
},
{
"name": "Phi-3",
"label": "Phi-3"
}
],
"id": "opea_service@llm_tgi_0-input-modelName-options"
},
{
Expand Down
9 changes: 9 additions & 0 deletions studio-backend/app/services/exporter_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def convert_proj_info_to_manifest(proj_info_json, output_file=None):
if 'app-nginx' in metadata['name'] and output_file is None:
continue
print(f"Processing {metadata['name']} service")

# Remove HF_TOKEN if hugging_face_token is 'NA'
if doc.get('kind') == 'ConfigMap' and 'data' in doc:
if 'HF_TOKEN' in doc['data'] and doc['data']['HF_TOKEN'] == 'NA':
del doc['data']['HF_TOKEN']

# Accumulate the YAML document in the manifest string
manifest_string += '---\n'
Expand Down Expand Up @@ -81,6 +86,10 @@ def convert_proj_info_to_compose(proj_info_json, output_file=None):

combined_services = {}
for doc, service_name in (output_compose):
# Remove HF_TOKEN if hugging_face_token is 'NA'
for _, service_data in doc.items():
if 'environment' in service_data and 'HF_TOKEN' in service_data['environment'] and service_data['environment']['HF_TOKEN'] == 'NA':
del service_data['environment']['HF_TOKEN']
combined_services.update(doc)

services_data = {
Expand Down
1 change: 1 addition & 0 deletions studio-backend/app/templates/microsvc-composes/tei.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HF_TOKEN: "{{huggingFaceToken}}"
entrypoint: /bin/sh -c "apt-get update && apt-get install -y curl && text-embeddings-router --json-output --model-id {{modelName}} --auto-truncate"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
Expand Down
2 changes: 1 addition & 1 deletion studio-backend/app/templates/microsvc-composes/tgi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"{{endpoint}}":
image: ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu
image: ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
container_name: "{{endpoint}}"
ports:
- "{{port}}:80"
Expand Down
4 changes: 3 additions & 1 deletion studio-backend/app/templates/microsvc-manifests/tgi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ data:
NUMBA_CACHE_DIR: "/tmp"
HF_HOME: "/tmp/.cache/huggingface"
CUDA_GRAPHS: "0"
HF_HUB_DISABLE_PROGRESS_BARS: "1"
HF_HUB_ENABLE_HF_TRANSFER: "0"
---
# Source: tgi/templates/service.yaml
# Copyright (C) 2024 Intel Corporation
Expand Down Expand Up @@ -65,7 +67,7 @@ spec:
name: config-{endpoint}
securityContext:
{}
image: "ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu"
image: "ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu"
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /data
Expand Down
2 changes: 1 addition & 1 deletion studio-backend/app/utils/namespace_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import time
from kubernetes.client.rest import ApiException

def wait_for_pod(namespace, pod_name, core_v1_api, timeout=300):
def wait_for_pod(namespace, pod_name, core_v1_api, timeout=600):
start_time = time.time()
while time.time() - start_time < timeout:
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
https_proxy: ${https_proxy}
command: --model-id BAAI/bge-large-en-v1.5 --auto-truncate
tgi-0:
image: ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu
image: ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
container_name: tgi-0
ports:
- 3081:80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ spec:
- configMapRef:
name: config-tgi-0
securityContext: {}
image: ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu
image: ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ spec:
- configMapRef:
name: config-tgi-0
securityContext: {}
image: ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu
image: ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /data
Expand Down

Large diffs are not rendered by default.

32 changes: 3 additions & 29 deletions studio-frontend/packages/server/src/nodes/llm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path';
import os from 'os';

test('001_test_sandbox_deployment', async ({ browser, baseURL }) => {
test.setTimeout(600000);
test.setTimeout(1200000);
const context = await browser.newContext({
ignoreHTTPSErrors: true
});
Expand Down Expand Up @@ -38,7 +38,7 @@ test('001_test_sandbox_deployment', async ({ browser, baseURL }) => {
// console.log(`Attempt ${i + 1} failed: ${error}`);
// }
// }
await waitForStatusText(page, 'td.MuiTableCell-root div.MuiStack-root p.MuiTypography-root', 'Ready', 5, 60000);
await waitForStatusText(page, 'td.MuiTableCell-root div.MuiStack-root p.MuiTypography-root', 'Ready', 10, 60000);
await page.waitForTimeout(8000);

// Open APP-UI
Expand Down
4 changes: 2 additions & 2 deletions tests/playwright/studio-e2e/002_test_sandbox_chatqna.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function setupResponseListener(page, apiResponse) {
}

test('002_test_sandbox_chatqna', async ({ browser, baseURL }) => {
test.setTimeout(600000);
test.setTimeout(1200000);
let apiResponse = { value: '' };
const context = await browser.newContext({
ignoreHTTPSErrors: true
Expand All @@ -63,7 +63,7 @@ test('002_test_sandbox_chatqna', async ({ browser, baseURL }) => {
await page.goto(IDC_URL);
await expect(page.locator('td.MuiTableCell-root div.MuiStack-root p.MuiTypography-root').first()).toHaveText('Not Running', { timeout: 60000 });
await page.getByLabel('a dense table').locator('button').first().click();
await waitForStatusText(page, 'td.MuiTableCell-root div.MuiStack-root p.MuiTypography-root', 'Ready', 5, 60000);
await waitForStatusText(page, 'td.MuiTableCell-root div.MuiStack-root p.MuiTypography-root', 'Ready', 10, 60000);
await page.waitForTimeout(10000);

// Open APP-UI
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from '@playwright/test';

export async function waitForStatusText(page: any, selector: string, statusText: string, maxAttempts: number = 5, intervalTimeout: number = 60000) {
export async function waitForStatusText(page: any, selector: string, statusText: string, maxAttempts: number = 10, intervalTimeout: number = 60000) {
for (let i = 0; i < maxAttempts; i++) {
try {
const text = await page.locator(selector).first().innerText();
Expand Down