Endpoint with adapter-transformers won't start up
I am trying to start up an inference endpoint for a pretrained adapter, which uses a custom handler and a requirements.txt file with only the adapter-transformers package. The endpoint, however, keeps encountering an error right after installing the adapter-transformers package. The stack trace from the endpoint logs are given below. Greatly appreciated if anyone could help out here!znnls 2023-09-25T21:16:30.170Z Installing custom dependencies from /repository/requirements.txt
znnls 2023-09-25T21:16:30.490Z Collecting adapter-transformers (from -r /repository/requirements.txt (line 1))
znnls 2023-09-25T21:16:30.529Z   Downloading adapter_transformers-3.2.1-py3-none-any.whl (6.4 MB)
znnls 2023-09-25T21:16:30.646Z      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 57.3 MB/s eta 0:00:00
znnls 2023-09-25T21:16:31.075Z Requirement already satisfied: huggingface-hub<1.0,>=0.11.0 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (0.16.4)
znnls 2023-09-25T21:16:31.075Z Requirement already satisfied: filelock in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (3.12.2)
znnls 2023-09-25T21:16:31.076Z Requirement already satisfied: numpy>=1.17 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (1.24.4)
znnls 2023-09-25T21:16:31.077Z Requirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (6.0.1)
znnls 2023-09-25T21:16:31.077Z Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (23.1)
znnls 2023-09-25T21:16:31.077Z Requirement already satisfied: regex!=2019.12.17 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (2023.8.8)
znnls 2023-09-25T21:16:31.078Z Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (0.13.3)
znnls 2023-09-25T21:16:31.078Z Requirement already satisfied: requests in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (2.31.0)
znnls 2023-09-25T21:16:31.079Z Requirement already satisfied: tqdm>=4.27 in /opt/conda/lib/python3.9/site-packages (from adapter-transformers->-r /repository/requirements.txt (line 1)) (4.66.1)
znnls 2023-09-25T21:16:31.171Z Requirement already satisfied: fsspec in /opt/conda/lib/python3.9/site-packages (from huggingface-hub<1.0,>=0.11.0->adapter-transformers->-r /repository/requirements.txt (line 1)) (2023.6.0)
znnls 2023-09-25T21:16:31.172Z Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.9/site-packages (from huggingface-hub<1.0,>=0.11.0->adapter-transformers->-r /repository/requirements.txt (line 1)) (4.7.1)
znnls 2023-09-25T21:16:31.199Z Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.9/site-packages (from requests->adapter-transformers->-r /repository/requirements.txt (line 1)) (3.4)
znnls 2023-09-25T21:16:31.199Z Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.9/site-packages (from requests->adapter-transformers->-r /repository/requirements.txt (line 1)) (3.2.0)
znnls 2023-09-25T21:16:31.200Z Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.9/site-packages (from requests->adapter-transformers->-r /repository/requirements.txt (line 1)) (2023.7.22)
znnls 2023-09-25T21:16:31.200Z Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.9/site-packages (from requests->adapter-transformers->-r /repository/requirements.txt (line 1)) (2.0.4)
znnls 2023-09-25T21:16:32.498Z Installing collected packages: adapter-transformers
znnls 2023-09-25T21:16:35.270Z Successfully installed adapter-transformers-3.2.1
znnls 2023-09-25T21:16:35.271Z WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
znnls 2023-09-25T21:16:37.048Z ImportError: cannot import name 'ClapTextModelWithProjection' from 'transformers' (/opt/conda/lib/python3.9/site-packages/transformers/__init__.py)
znnls 2023-09-25T21:16:37.048Z   File "/app/webservice_starlette.py", line 19, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/config.py", line 467, in load
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/main.py", line 416, in main
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/diffusers/pipelines/audioldm/pipeline_audioldm.py", line 21, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/importer.py", line 21, in import_from_string
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/server.py", line 68, in serve
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/main.py", line 587, in run
znnls 2023-09-25T21:16:37.048Z     from .pipelines import (
znnls 2023-09-25T21:16:37.048Z     rv = self.invoke(ctx)
znnls 2023-09-25T21:16:37.048Z   File "/app/huggingface_inference_toolkit/utils.py", line 13, in <module>
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 783, in invoke
znnls 2023-09-25T21:16:37.048Z     self.loaded_app = import_from_string(self.app)
znnls 2023-09-25T21:16:37.048Z     from transformers import ClapTextModelWithProjection, RobertaTokenizer, RobertaTokenizerFast, SpeechT5HifiGan
znnls 2023-09-25T21:16:37.048Z     from huggingface_inference_toolkit.utils import check_and_register_custom_pipeline_from_directory, get_pipeline
znnls 2023-09-25T21:16:37.048Z     config.load()
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/diffusers/__init__.py", line 64, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/importlib/__init__.py", line 127, in import_module
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/diffusers/pipelines/__init__.py", line 48, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1078, in main
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/bin/uvicorn", line 8, in <module>
znnls 2023-09-25T21:16:37.048Z     from .pipeline_audioldm import AudioLDMPipeline
znnls 2023-09-25T21:16:37.048Z     from huggingface_inference_toolkit.diffusers_utils import (
znnls 2023-09-25T21:16:37.048Z     from huggingface_inference_toolkit.handler import get_inference_handler_either_custom_or_default_handler
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
znnls 2023-09-25T21:16:37.048Z     return future.result()
znnls 2023-09-25T21:16:37.048Z     return ctx.invoke(self.callback, **ctx.params)
znnls 2023-09-25T21:16:37.048Z     return self.main(*args, **kwargs)
znnls 2023-09-25T21:16:37.048Z     from diffusers import AutoPipelineForText2Image, DPMSolverMultistepScheduler, StableDiffusionPipeline
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
znnls 2023-09-25T21:16:37.048Z     server.run()
znnls 2023-09-25T21:16:37.048Z     return __callback(*args, **kwargs)
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/diffusers/pipelines/audioldm/__init__.py", line 17, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/uvicorn/server.py", line 61, in run
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
znnls 2023-09-25T21:16:37.048Z   File "/app/huggingface_inference_toolkit/diffusers_utils.py", line 18, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/app/huggingface_inference_toolkit/handler.py", line 5, in <module>
znnls 2023-09-25T21:16:37.048Z   File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run
znnls 2023-09-25T21:16:37.048Z     return _bootstrap._gcd_import(name[level:], package, level)
znnls 2023-09-25T21:16:37.048Z     return asyncio.run(self.serve(sockets=sockets))
znnls 2023-09-25T21:16:37.048Z     run(
znnls 2023-09-25T21:16:37.048Z Traceback (most recent call last):
znnls 2023-09-25T21:16:37.048Z     from .audioldm import AudioLDMPipeline
znnls 2023-09-25T21:16:37.048Z   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
znnls 2023-09-25T21:16:37.048Z     module = importlib.import_module(module_str)
znnls 2023-09-25T21:16:37.048Z     return loop.run_until_complete(main)
znnls 2023-09-25T21:16:37.048Z     sys.exit(main())