Text Classification
PyTorch
Safetensors
English
eurovoc
Inference Endpoints

Using endpoint for test

#3
by Nasredine - opened
European Parliament org

Hi,

I previously used the following endpoint for some tests: https://xizrpi3gdk25o8lm.eu-west-1.aws.endpoints.huggingface.cloud. It appears to be no longer available.
Do you provide access to the new version of the annotator through a public endpoint?

Thank you in advance.

European Parliament org

Hi Nasredine,
Indeed that URL is not a good one try that one: https://a933b0hcdb86onmt.eu-west-1.aws.endpoints.huggingface.cloud
Best regards,
Sébastien

scampion changed discussion status to closed
European Parliament org

Thank you for response Sébastien.
I'm getting this error : error":"401 Unauthorized
I've used old and new token from HF, I get same error. Is the endpoint available for everyone ?

Regards.

European Parliament org

The endpoint is available only for Members of the European Parliament.

European Parliament org
edited Apr 19

I tried to deploy a specific endpoint, but failed, is seems that there are dependencies issues:
...
2024/04/19 11:08:21 ~ Successfully uninstalled transformers-4.38.2
2024/04/19 11:08:24 ~ ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
2024/04/19 11:08:24 ~ huggingface-inference-toolkit 0.3.0 requires transformers[audio,sentencepiece,sklearn,vision]==4.38.2, but you have transformers 4.32.0 which is incompatible.
2024/04/19 11:08:24 ~ Successfully installed aiohttp-3.8.5 aiosignal-1.3.1 asttokens-2.4.1 async-timeout-4.0.3 backcall-0.2.0 executing-2.0.1 frozenlist-1.4.1 ipython-8.14.0 jedi-0.19.1 lightning-utilities-0.11.2 matplotlib-inline-0.1.7 multidict-6.0.5 parso-0.8.4 pexpect-4.9.0 pickleshare-0.7.5 pip-chill-1.0.3 prompt-toolkit-3.0.43 ptyprocess-0.7.0 pure-eval-0.2.2 pygments-2.17.2 pytorch-lightning-2.0.5 scikit-learn-1.3.0 stack-data-0.6.3 tokenizers-0.13.3 torchmetrics-1.3.2 traitlets-5.14.2 transformers-4.32.0 wcwidth-0.2.13 yarl-1.9.4
2024/04/19 11:08:24 ~ 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
2024/04/19 11:08:26 ~ /usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py:260: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
2024/04/19 11:08:26 ~ torch.utils._pytree._register_pytree_node(
2024/04/19 11:08:27 ~ /usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py:260: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
2024/04/19 11:08:27 ~ torch.utils._pytree._register_pytree_node(
2024/04/19 11:08:27 ~ /usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py:260: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
2024/04/19 11:08:27 ~ torch.utils._pytree._register_pytree_node(
2024/04/19 11:08:27 ~ /usr/local/lib/python3.10/dist-packages/diffusers/utils/outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
2024/04/19 11:08:27 ~ torch.utils._pytree._register_pytree_node(
2024/04/19 11:08:27 ~ Traceback (most recent call last):
2024/04/19 11:08:27 ~ File "/usr/local/bin/uvicorn", line 8, in
2024/04/19 11:08:27 ~ sys.exit(main())
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in call
2024/04/19 11:08:27 ~ return self.main(*args, **kwargs)
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
2024/04/19 11:08:27 ~ rv = self.invoke(ctx)
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
2024/04/19 11:08:27 ~ return ctx.invoke(self.callback, **ctx.params)
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
2024/04/19 11:08:27 ~ return __callback(*args, **kwargs)
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/main.py", line 409, in main
2024/04/19 11:08:27 ~ run(
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/main.py", line 575, in run
2024/04/19 11:08:27 ~ server.run()
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 62, in run
2024/04/19 11:08:27 ~ return asyncio.run(self.serve(sockets=sockets))
2024/04/19 11:08:27 ~ File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
2024/04/19 11:08:27 ~ return loop.run_until_complete(main)
2024/04/19 11:08:27 ~ File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
2024/04/19 11:08:27 ~ return future.result()
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 69, in serve
2024/04/19 11:08:27 ~ config.load()
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/config.py", line 433, in load
2024/04/19 11:08:27 ~ self.loaded_app = import_from_string(self.app)
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/uvicorn/importer.py", line 19, in import_from_string
2024/04/19 11:08:27 ~ module = importlib.import_module(module_str)
2024/04/19 11:08:27 ~ File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
2024/04/19 11:08:27 ~ return _bootstrap._gcd_import(name[level:], package, level)
2024/04/19 11:08:27 ~ File "", line 1050, in _gcd_import
2024/04/19 11:08:27 ~ File "", line 1027, in _find_and_load
2024/04/19 11:08:27 ~ File "", line 1006, in _find_and_load_unlocked
2024/04/19 11:08:27 ~ File "", line 688, in _load_unlocked
2024/04/19 11:08:27 ~ File "", line 883, in exec_module
2024/04/19 11:08:27 ~ File "", line 241, in _call_with_frames_removed
2024/04/19 11:08:27 ~ File "/app/webservice_starlette.py", line 19, in
2024/04/19 11:08:27 ~ from huggingface_inference_toolkit.handler import get_inference_handler_either_custom_or_default_handler
2024/04/19 11:08:27 ~ File "/app/huggingface_inference_toolkit/handler.py", line 5, in
2024/04/19 11:08:27 ~ from huggingface_inference_toolkit.utils import check_and_register_custom_pipeline_from_directory, get_pipeline
2024/04/19 11:08:27 ~ File "/app/huggingface_inference_toolkit/utils.py", line 17, in
2024/04/19 11:08:27 ~ from huggingface_inference_toolkit.sentence_transformers_utils import (
2024/04/19 11:08:27 ~ File "/app/huggingface_inference_toolkit/sentence_transformers_utils.py", line 11, in
2024/04/19 11:08:27 ~ from sentence_transformers import CrossEncoder, SentenceTransformer, util
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/init.py", line 3, in
2024/04/19 11:08:27 ~ from .datasets import SentencesDataset, ParallelSentencesDataset
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/datasets/init.py", line 1, in
2024/04/19 11:08:27 ~ from .DenoisingAutoEncoderDataset import DenoisingAutoEncoderDataset
2024/04/19 11:08:27 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/datasets/DenoisingAutoEncoderDataset.py", line 5, in
2024/04/19 11:08:27 ~ from transformers.utils.import_utils import is_nltk_available, NLTK_IMPORT_ERROR
2024/04/19 11:08:27 ~ ImportError: cannot import name 'is_nltk_available' from 'transformers.utils.import_utils' (/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py)

European Parliament org

I updated the requirements.txt to add nltk
Could you test again ?

scampion changed discussion status to open
European Parliament org

the error persists:

2024/04/26 14:20:22 ~ File "/app/webservice_starlette.py", line 19, in
2024/04/26 14:20:22 ~ from huggingface_inference_toolkit.handler import get_inference_handler_either_custom_or_default_handler
2024/04/26 14:20:22 ~ File "/app/huggingface_inference_toolkit/handler.py", line 5, in
2024/04/26 14:20:22 ~ from huggingface_inference_toolkit.utils import check_and_register_custom_pipeline_from_directory, get_pipeline
2024/04/26 14:20:22 ~ File "/app/huggingface_inference_toolkit/utils.py", line 17, in
2024/04/26 14:20:22 ~ from huggingface_inference_toolkit.sentence_transformers_utils import (
2024/04/26 14:20:22 ~ File "/app/huggingface_inference_toolkit/sentence_transformers_utils.py", line 11, in
2024/04/26 14:20:22 ~ from sentence_transformers import CrossEncoder, SentenceTransformer, util
2024/04/26 14:20:22 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/init.py", line 3, in
2024/04/26 14:20:22 ~ from .datasets import SentencesDataset, ParallelSentencesDataset
2024/04/26 14:20:22 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/datasets/init.py", line 1, in
2024/04/26 14:20:22 ~ from .DenoisingAutoEncoderDataset import DenoisingAutoEncoderDataset
2024/04/26 14:20:22 ~ File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/datasets/DenoisingAutoEncoderDataset.py", line 5, in
2024/04/26 14:20:22 ~ from transformers.utils.import_utils import is_nltk_available, NLTK_IMPORT_ERROR
2024/04/26 14:20:22 ~ ImportError: cannot import name 'is_nltk_available' from 'transformers.utils.import_utils' (/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py)

Sign up or log in to comment