Skip to content
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

Initiate "AvatarChatbot" (audio) example #923

Merged
merged 87 commits into from
Oct 23, 2024

Conversation

ctao456
Copy link
Collaborator

@ctao456 ctao456 commented Oct 9, 2024

Description

Initiate AvatarChatbot (audio) example

Issues

RFC Link: https://github.com/opea-project/docs/blob/main/community/rfcs/24-08-02-OPEA-AIAvatarChatbot.md

Fixed commented issues in #523

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

PR for adding "animation" component: opea-project/GenAIComps#775

Tests

curl http://${host_ip}:3009/v1/avatarchatbot
-X POST
-d @sample_whoareyou.json
-H 'Content-Type: application/json'

If the megaservice is running properly, you should see the following output:

"/outputs/result.mp4"

@ctao456 ctao456 requested a review from lvliang-intel as a code owner October 9, 2024 22:23
@ctao456 ctao456 changed the title Add an AvatarChatbot (audio) example Initiate "AvatarChatbot" (audio) example Oct 9, 2024
ctao456 and others added 5 commits October 9, 2024 22:49
This reverts commit 694823a.

Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: ZePan110 <[email protected]>
Co-authored-by: kevinintel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@ctao456 ctao456 force-pushed the ctao/opea branch 2 times, most recently from 8c3fce2 to 6ee272b Compare October 9, 2024 22:57
Copy link
Collaborator

@louie-tsai louie-tsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. some minor feedbacks.

AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml Outdated Show resolved Hide resolved
AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml Outdated Show resolved Hide resolved
ctao456 and others added 21 commits October 22, 2024 04:16
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
@ctao456
Copy link
Collaborator Author

ctao456 commented Oct 22, 2024

There was an error with the latest "whisper-gaudi" docker image in GenAIComps that's causing the CI Docker container not starting properly:

$ docker run -p 7066:7066 --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/whisper-gaudi:comp

[WARNING|utils.py:212] 2024-10-22 22:45:21,543 >> optimum-habana v1.14.0 has been validated for SynapseAI v1.18.0 but habana-frameworks v1.16.1.7 was found, this could lead to undefined behavior!
[WARNING|utils.py:225] 2024-10-22 22:45:22,337 >> optimum-habana v1.14.0 has been validated for SynapseAI v1.18.0 but the driver version is v1.16.2, this could lead to undefined behavior!
/home/user/.local/lib/python3.10/site-packages/transformers/deepspeed.py:24: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations
  warnings.warn(
============================= HABANA PT BRIDGE CONFIGURATION =========================== 
 PT_HPU_LAZY_MODE = 1
 PT_RECIPE_CACHE_PATH = 
 PT_CACHE_FOLDER_DELETE = 0
 PT_HPU_RECIPE_CACHE_CONFIG = 
 PT_HPU_MAX_COMPOUND_OP_SIZE = 9223372036854775807
 PT_HPU_LAZY_ACC_PAR_MODE = 1
 PT_HPU_ENABLE_REFINE_DYNAMIC_SHAPES = 0
---------------------------: System Configuration :---------------------------
Num CPU Cores : 152
CPU RAM       : 1056439240 KB
------------------------------------------------------------------------------
Downloading model: openai/whisper-small
[ASR] fetch warmup audio...
[ASR] warmup...
Traceback (most recent call last):
  File "/home/user/comps/asr/whisper/dependency/whisper_server.py", line 62, in <module>
    asr = WhisperModel(model_name_or_path=args.model_name_or_path, language=args.language, device=args.device)
  File "/home/user/comps/asr/whisper/dependency/whisper_model.py", line 36, in __init__
    self._warmup_whisper_hpu_graph("https://github.com/Spycsh/assets/raw/main/ljspeech_60s_audio.wav")
  File "/home/user/comps/asr/whisper/dependency/whisper_model.py", line 100, in _warmup_whisper_hpu_graph
    _ = self.model.generate(
  File "/home/user/.local/lib/python3.10/site-packages/transformers/models/whisper/generation_whisper.py", line 520, in generate
    timestamp_begin = self._set_return_timestamps(
  File "/home/user/.local/lib/python3.10/site-packages/transformers/models/whisper/generation_whisper.py", line 1188, in _set_return_timestamps
    raise ValueError(
ValueError: You have passed more than 3000 mel input features (> 30 seconds) which automatically enables long-form generation which requires the model to predict timestamp tokens. Please either pass `return_timestamps=True` or make sure to pass no more than 3000 mel input features.

The above issue is causing one check fail now for this PR. It was not related to changes from this PR.

@chensuyue
Copy link
Collaborator

Pending on issue opea-project/GenAIComps#817

@lvliang-intel lvliang-intel merged commit cfffb4c into opea-project:main Oct 23, 2024
14 checks passed
arcyleung pushed a commit to arcyleung/GenAIExamples that referenced this pull request Nov 4, 2024
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: rbrugaro <[email protected]>
Signed-off-by: ZePan110 <[email protected]>
Signed-off-by: Louie Tsai <[email protected]>
Signed-off-by: chen, suyue <[email protected]>
Co-authored-by: rbrugaro <[email protected]>
Co-authored-by: ZePan110 <[email protected]>
Co-authored-by: kevinintel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Louie Tsai <[email protected]>
Co-authored-by: chen, suyue <[email protected]>
Signed-off-by: Arthur Leung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants