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

AssertionError: cam++ is not registered on CUDA12.1 #1871

Open
ozora-ogino opened this issue Jul 3, 2024 · 0 comments
Open

AssertionError: cam++ is not registered on CUDA12.1 #1871

ozora-ogino opened this issue Jul 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ozora-ogino
Copy link

ozora-ogino commented Jul 3, 2024

Notice: In order to resolve issues more efficiently, please raise issue following the template.
(注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

environment: cuda:12.1, torch:2.3.1, funasr:1.0.30, modelscope: 1.15.0

Run the code sample on this dockerfile

ARG PYTORCH="2.3.1"
ARG CUDA="12.1"
ARG CUDNN="8"

FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel

ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"

RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub

RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
	&& apt-get clean \
	&& rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip && \
	pip install --no-cache-dir librosa soundfile faster-whisper "numpy<2.0.0"

RUN pip install openai google-cloud-speech wandb pydub bert_score evaluate jiwer funasr modelscope

WORKDIR /workspace

Code sample

When I run following code error happen on cuda:12.1 but not happend when I use cuda 11.6.

from funasr import AutoModel
model = AutoModel(model="cam++", model_revision="v2.0.2")

Error message:

2024-07-03 05:06:22,007 - modelscope - INFO - PyTorch version 2.3.1 Found.
2024-07-03 05:06:22,008 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-07-03 05:06:22,044 - modelscope - INFO - Updating the files for the changes of local files, first time updating will take longer time! Please wait till updating done!
2024-07-03 05:06:22,058 - modelscope - INFO - AST-Scanning the path "/opt/conda/lib/python3.10/site-packages/modelscope" with the following sub folders ['models', 'metrics', 'pipelines', 'preprocessors', 'trainers', 'msdatasets', 'exporters']
Download: iic/speech_campplus_sv_zh-cn_16k-common failed!: During ast indexing the file /opt/conda/lib/python3.10/site-packages/modelscope/models/cv/indoor_layout_estimation/networks/utils.py, a related error excepted in the file /opt/conda/lib/python3.10/site-packages/modelscope/utils/ast_utils.py at line: 152: "attr = getattr(node, field)" with error msg: "AttributeError: 'ClassDef' object has no attribute 'type_params'", please double check the origin file /opt/conda/lib/python3.10/site-packages/modelscope/models/cv/indoor_layout_estimation/networks/utils.py to see whether the file is correctly edited.
Traceback (most recent call last):
  File "/workspace/src/diarizer.py", line 112, in <module>
    diarize(wav_files, dest)
  File "/workspace/src/diarizer.py", line 84, in diarize
    embed_model = CamPlus()
  File "/workspace/src/diarizer.py", line 45, in __init__
    self.model = AutoModel(model="cam++", model_revision="v2.0.2")
  File "/opt/conda/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 124, in __init__
    model, kwargs = self.build_model(**kwargs)
  File "/opt/conda/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 218, in build_model
    assert model_class is not None, f'{kwargs["model"]} is not registered'
AssertionError: cam++ is not registered

Expected behavior

Cam++ model is loaded without error.

Environment

  • OS (e.g., Linux): Linux
  • FunASR Version (e.g., 1.0.0): 1.0.30
  • ModelScope Version (e.g., 1.11.0): 1.15.0
  • PyTorch Version (e.g., 2.0.0): 2.3.1
  • How you installed funasr (pip, source): pip
  • Python version: 3.10
  • GPU (e.g., V100M32)
  • CUDA/cuDNN version (e.g., cuda11.7): cuda12.1
  • Docker version (e.g., funasr-runtime-sdk-cpu-0.4.1)
  • Any other relevant information:

Additional context

@ozora-ogino ozora-ogino added the bug Something isn't working label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant