User Details
- User Since
- Aug 3 2019, 6:58 AM (278 w, 5 d)
- Availability
- Available
- IRC Nick
- kevinbazira
- LDAP User
- Kevin Bazira
- MediaWiki User
- KBazira (WMF) [ Global Accounts ]
Today
I tested the inference performance of both non-quantized and GPTQ quantized versions of the of aya-8b model and found:
- CohereForAI/aya-23-8B inference speed exceeded 60 seconds while shuyuej/aya-23-8B-GPTQ dropped to about 36 seconds.
- CohereForAI/aya-expanse-8b inference speed was around 6 seconds while 2z299/aya-expanse-8b-GPTQ-4bit surprisingly increased to 28 seconds.
@Isaac thank you for sharing feedback and suggesting improvements. We have:
- handled empty article-country results gracefully
- returned wikidata_properties as a list of dicts
- sorted results by score
- normalized using a fixed minimum sum of 1
Yesterday
After running export PYTORCH_HIP_ALLOC_CONF=expandable_segments:True, I finally got the inference as shown in: https://phabricator.wikimedia.org/P71539
This seems to be a known issue when using a shared HF cache dir: https://github.com/huggingface/datasets/issues/6589
I disabled memory tracking as shown below, and the benchmark for non-quantized model ran as shown in: https://phabricator.wikimedia.org/P71521
scenario_config = InferenceConfig(latency=True, memory=False)
Following the instructions from: https://github.com/ROCm/amdsmi, running amd-smi --help shows it's installed.
Mon, Dec 2
All test images that previously had tox.ini in a specific dir have been updated. The CI entrypoint now assumes that tox.ini is in the root dir, automated tests can be run as shown below:
$ docker build --tag revertrisk:test --target test -f .pipeline/revertrisk/revertrisk.yaml . $ docker run -it --entrypoint=/bin/bash revertrisk:test $ ./entrypoint.sh ci-lint ci-unit
Fri, Nov 29
Thu, Nov 28
Wed, Nov 27
Tue, Nov 26
Mon, Nov 25
Fri, Nov 22
Thu, Nov 21
Wed, Nov 20
I saw the comment in the schema about /* can't be one for all countries */ -- can you tell me more about that?
I was wondering if all countries having a score of 1 indicates that they each hold equal relevance in the results. Given the expected behavior of the score in comparison to other models, how will users or tools be able to differentiate between the results?
Tue, Nov 12
Thu, Nov 7
Tue, Nov 5
Running unit tests has been automated. When a model server's test variant has all the necessary files (model-server, python utils, unit tests, tox.ini, entrypoint.sh, and their dependencies), one can run the unit tests as shown below:
$ docker build --tag revertrisk:test --target test -f .pipeline/revertrisk/revertrisk.yaml . $ docker run -it --entrypoint=/bin/bash revertrisk:test $ ./entrypoint.sh ci-lint ci-unit
This is the same process CI uses.
Nov 5 2024
Nov 4 2024
Nov 1 2024
@Isaac thank you for testing the article-country experimental endpoint and sharing the issues you found. We have:
- removed support for QID input
- initialized claims as a dict
- added support for async API calls
Oct 25 2024
Oct 24 2024
The new langid image with a model-server that normalizes text input has been deployed :
bash # pod running in eqiad kevinbazira@deploy2002:~$ kube_env llm ml-serve-eqiad kevinbazira@deploy2002:~$ kubectl get pods NAME READY STATUS RESTARTS AGE langid-predictor-default-00010-deployment-6bdfc66fc5-vc2fl 3/3 Running 0 70s
We noticed that keeping only alphanumeric characters removes spaces and punctuation marks which changes the prediction results as shown below:
1.Langauge prediction changed from English to Ilocano when spaces were removed
bash root@a49ef1a9119b:/home# curl localhost:8080/v1/models/langid:predict -i -X POST -d '{"text": "Some random text in any language"}' HTTP/1.1 200 OK date: Wed, 23 Oct 2024 13:26:51 GMT server: uvicorn content-length: 90 content-type: application/json
Oct 23 2024
Text normalization has been added to the langid model-server and it fixed this issue as shown below:
root@a49ef1a9119b:/home# curl localhost:8080/v1/models/langid:predict -i -X POST -d '{"text": "Some sample text in any language that we want to identify\n\n\n"}' HTTP/1.1 500 Internal Server Error date: Wed, 23 Oct 2024 05:53:45 GMT server: uvicorn content-length: 76 content-type: application/json
Oct 22 2024
We renamed the data directory and all data files to accurately reflect their contents, then updated all respective paths in the load tests. We now handle data in load tests using conventions that align with our model-servers.
Oct 17 2024
Oct 16 2024
Oct 15 2024
Hi @Isaac, thank you for working on the article-country model. We have deployed its model-server on LiftWing as shown below. Please test this internal endpoint and let us know if you come across any issues.
bash # pod running in experimental ns kevinbazira@deploy2002:~$ kube_env experimental ml-staging-codfw kevinbazira@deploy2002:~$ kubectl get pods NAME READY STATUS RESTARTS AGE article-country-predictor-00002-deployment-76d857597b-clwgj 3/3 Running 0 61s
Oct 11 2024
Oct 10 2024
In T360177#9633442 the solution to this issue was adding the wheel package. Since this package already exists in requirements.txt, I updated fasttext from 0.9.2 to 0.9.3 and this fixed the issue as shown below:
root@8f0ee9e9b80b:/home/inference-services# make language-identification make[1]: Entering directory '/home/inference-services' python3 -m venv my_venv my_venv/bin/pip install --upgrade pip Requirement already satisfied: pip in ./my_venv/lib/python3.9/site-packages (20.3.4) Collecting pip Using cached pip-24.2-py3-none-any.whl (1.8 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 20.3.4 Uninstalling pip-20.3.4: Successfully uninstalled pip-20.3.4 Successfully installed pip-24.2 my_venv/bin/pip install -r python/requirements.txt Collecting aiohttp==3.9.3 (from -r python/requirements.txt (line 1)) Using cached aiohttp-3.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.4 kB) Collecting PyYAML==6.0.1 (from -r python/requirements.txt (line 2)) Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB) Collecting pyopencl==2024.2.7 (from -r python/requirements.txt (line 3)) Using cached pyopencl-2024.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.7 kB) Collecting aiosignal>=1.1.2 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB) Collecting attrs>=17.3.0 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached attrs-24.2.0-py3-none-any.whl.metadata (11 kB) Collecting frozenlist>=1.1.1 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached frozenlist-1.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB) Collecting multidict<7.0,>=4.5 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached multidict-6.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.0 kB) Collecting yarl<2.0,>=1.0 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached yarl-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (52 kB) Collecting async-timeout<5.0,>=4.0 (from aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB) Collecting numpy (from pyopencl==2024.2.7->-r python/requirements.txt (line 3)) Using cached numpy-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB) Collecting platformdirs>=2.2.0 (from pyopencl==2024.2.7->-r python/requirements.txt (line 3)) Using cached platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB) Collecting pytools>=2024.1.5 (from pyopencl==2024.2.7->-r python/requirements.txt (line 3)) Using cached pytools-2024.1.14-py3-none-any.whl.metadata (3.0 kB) Collecting typing-extensions>=4.1.0 (from multidict<7.0,>=4.5->aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB) Collecting idna>=2.0 (from yarl<2.0,>=1.0->aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached idna-3.10-py3-none-any.whl.metadata (10 kB) Collecting propcache>=0.2.0 (from yarl<2.0,>=1.0->aiohttp==3.9.3->-r python/requirements.txt (line 1)) Using cached propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB) Using cached aiohttp-3.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB) Using cached PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB) Using cached pyopencl-2024.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (698 kB) Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB) Using cached attrs-24.2.0-py3-none-any.whl (63 kB) Using cached frozenlist-1.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240 kB) Using cached multidict-6.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124 kB) Using cached platformdirs-4.3.6-py3-none-any.whl (18 kB) Using cached pytools-2024.1.14-py3-none-any.whl (89 kB) Using cached yarl-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313 kB) Using cached numpy-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.5 MB) Using cached idna-3.10-py3-none-any.whl (70 kB) Using cached propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (211 kB) Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB) Installing collected packages: typing-extensions, PyYAML, propcache, platformdirs, numpy, idna, frozenlist, attrs, async-timeout, pytools, multidict, aiosignal, yarl, pyopencl, aiohttp Successfully installed PyYAML-6.0.1 aiohttp-3.9.3 aiosignal-1.3.1 async-timeout-4.0.3 attrs-24.2.0 frozenlist-1.4.1 idna-3.10 multidict-6.1.0 numpy-2.0.2 platformdirs-4.3.6 propcache-0.2.0 pyopencl-2024.2.7 pytools-2024.1.14 typing-extensions-4.12.2 yarl-1.14.0 # Conditional installation based on MODEL_NAME to support local run requirements Collecting kserve==0.13.1 (from -r src/models/langid/././requirements.txt (line 1)) Using cached kserve-0.13.1-py3-none-any.whl.metadata (9.1 kB) Collecting wheel (from -r src/models/langid/././requirements.txt (line 2)) Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB) Collecting fasttext==0.9.3 (from -r src/models/langid/././requirements.txt (line 3)) Using cached fasttext-0.9.3-cp39-cp39-linux_x86_64.whl Collecting cloudevents<2.0.0,>=1.6.2 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached cloudevents-1.11.0-py3-none-any.whl.metadata (6.9 kB) Collecting fastapi<0.110.0,>=0.109.1 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached fastapi-0.109.2-py3-none-any.whl.metadata (25 kB) Collecting grpcio<2.0.0,>=1.49.1 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached grpcio-1.66.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.9 kB) Collecting httpx<0.27.0,>=0.26.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached httpx-0.26.0-py3-none-any.whl.metadata (7.6 kB) Collecting kubernetes>=23.3.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached kubernetes-31.0.0-py2.py3-none-any.whl.metadata (1.5 kB) Collecting numpy<2.0.0,>=1.23.5 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB) Collecting orjson<4.0.0,>=3.9.15 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached orjson-3.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (50 kB) Collecting pandas>=1.3.5 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB) Collecting prometheus-client<0.21.0,>=0.20.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached prometheus_client-0.20.0-py3-none-any.whl.metadata (1.8 kB) Collecting protobuf<4.0.0,>=3.19.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached protobuf-3.20.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (679 bytes) Collecting psutil<6.0.0,>=5.9.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (21 kB) Collecting pydantic<3,>1.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pydantic-2.9.2-py3-none-any.whl.metadata (149 kB) Collecting python-dateutil<3.0.0,>=2.8.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB) Requirement already satisfied: pyyaml<7.0.0,>=6.0.0 in ./my_venv/lib/python3.9/site-packages (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (6.0.1) Collecting ray<2.11.0,>=2.10.0 (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached ray-2.10.0-cp39-cp39-manylinux2014_x86_64.whl.metadata (13 kB) Collecting six<2.0.0,>=1.16.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB) Collecting tabulate<0.10.0,>=0.9.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached tabulate-0.9.0-py3-none-any.whl.metadata (34 kB) Collecting timing-asgi<0.4.0,>=0.3.0 (from kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached timing_asgi-0.3.1-py3-none-any.whl.metadata (3.7 kB) Collecting uvicorn<0.22.0,>=0.21.1 (from uvicorn[standard]<0.22.0,>=0.21.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached uvicorn-0.21.1-py3-none-any.whl.metadata (6.3 kB) Collecting pybind11>=2.2 (from fasttext==0.9.3->-r src/models/langid/././requirements.txt (line 3)) Using cached pybind11-2.13.6-py3-none-any.whl.metadata (9.5 kB) Requirement already satisfied: setuptools>=0.7.0 in ./my_venv/lib/python3.9/site-packages (from fasttext==0.9.3->-r src/models/langid/././requirements.txt (line 3)) (44.1.1) Collecting deprecation<3.0,>=2.0 (from cloudevents<2.0.0,>=1.6.2->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached deprecation-2.1.0-py2.py3-none-any.whl.metadata (4.6 kB) Collecting starlette<0.37.0,>=0.36.3 (from fastapi<0.110.0,>=0.109.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached starlette-0.36.3-py3-none-any.whl.metadata (5.9 kB) Requirement already satisfied: typing-extensions>=4.8.0 in ./my_venv/lib/python3.9/site-packages (from fastapi<0.110.0,>=0.109.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (4.12.2) Collecting anyio (from httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached anyio-4.6.0-py3-none-any.whl.metadata (4.6 kB) Collecting certifi (from httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB) Collecting httpcore==1.* (from httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached httpcore-1.0.6-py3-none-any.whl.metadata (21 kB) Requirement already satisfied: idna in ./my_venv/lib/python3.9/site-packages (from httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (3.10) Collecting sniffio (from httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB) Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB) Collecting google-auth>=1.0.1 (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached google_auth-2.35.0-py2.py3-none-any.whl.metadata (4.7 kB) Collecting websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached websocket_client-1.8.0-py3-none-any.whl.metadata (8.0 kB) Collecting requests (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB) Collecting requests-oauthlib (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl.metadata (11 kB) Collecting oauthlib>=3.2.2 (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached oauthlib-3.2.2-py3-none-any.whl.metadata (7.5 kB) Collecting urllib3>=1.24.2 (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB) Collecting durationpy>=0.7 (from kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached durationpy-0.9-py3-none-any.whl.metadata (338 bytes) Collecting pytz>=2020.1 (from pandas>=1.3.5->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB) Collecting tzdata>=2022.7 (from pandas>=1.3.5->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached tzdata-2024.2-py2.py3-none-any.whl.metadata (1.4 kB) Collecting annotated-types>=0.6.0 (from pydantic<3,>1.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB) Collecting pydantic-core==2.23.4 (from pydantic<3,>1.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB) Collecting click>=7.0 (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB) Collecting filelock (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB) Collecting jsonschema (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB) Collecting msgpack<2.0.0,>=1.0.0 (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached msgpack-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.4 kB) Collecting packaging (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB) Requirement already satisfied: aiosignal in ./my_venv/lib/python3.9/site-packages (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (1.3.1) Requirement already satisfied: frozenlist in ./my_venv/lib/python3.9/site-packages (from ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (1.4.1) Collecting py-spy>=0.2.0 (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached py_spy-0.3.14-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (16 kB) Collecting watchfiles (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached watchfiles-0.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB) Collecting opencensus (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached opencensus-0.11.4-py2.py3-none-any.whl.metadata (12 kB) Collecting virtualenv!=20.21.1,>=20.0.24 (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached virtualenv-20.26.6-py3-none-any.whl.metadata (4.5 kB) Collecting aiohttp-cors (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached aiohttp_cors-0.7.0-py3-none-any.whl.metadata (20 kB) Requirement already satisfied: aiohttp>=3.7 in ./my_venv/lib/python3.9/site-packages (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (3.9.3) Collecting smart-open (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached smart_open-7.0.5-py3-none-any.whl.metadata (24 kB) Collecting colorful (from ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached colorful-0.5.6-py2.py3-none-any.whl.metadata (16 kB) Collecting httptools>=0.5.0 (from uvicorn[standard]<0.22.0,>=0.21.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached httptools-0.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.6 kB) Collecting python-dotenv>=0.13 (from uvicorn[standard]<0.22.0,>=0.21.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB) Collecting uvloop!=0.15.0,!=0.15.1,>=0.14.0 (from uvicorn[standard]<0.22.0,>=0.21.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached uvloop-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB) Collecting websockets>=10.4 (from uvicorn[standard]<0.22.0,>=0.21.1->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB) Requirement already satisfied: attrs>=17.3.0 in ./my_venv/lib/python3.9/site-packages (from aiohttp>=3.7->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (24.2.0) Requirement already satisfied: multidict<7.0,>=4.5 in ./my_venv/lib/python3.9/site-packages (from aiohttp>=3.7->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (6.1.0) Requirement already satisfied: yarl<2.0,>=1.0 in ./my_venv/lib/python3.9/site-packages (from aiohttp>=3.7->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (1.14.0) Requirement already satisfied: async-timeout<5.0,>=4.0 in ./my_venv/lib/python3.9/site-packages (from aiohttp>=3.7->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (4.0.3) Collecting cachetools<6.0,>=2.0.0 (from google-auth>=1.0.1->kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached cachetools-5.5.0-py3-none-any.whl.metadata (5.3 kB) Collecting pyasn1-modules>=0.2.1 (from google-auth>=1.0.1->kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pyasn1_modules-0.4.1-py3-none-any.whl.metadata (3.5 kB) Collecting rsa<5,>=3.1.4 (from google-auth>=1.0.1->kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached rsa-4.9-py3-none-any.whl.metadata (4.2 kB) Collecting exceptiongroup>=1.0.2 (from anyio->httpx<0.27.0,>=0.26.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached exceptiongroup-1.2.2-py3-none-any.whl.metadata (6.6 kB) Collecting distlib<1,>=0.3.7 (from virtualenv!=20.21.1,>=20.0.24->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB) Requirement already satisfied: platformdirs<5,>=3.9.1 in ./my_venv/lib/python3.9/site-packages (from virtualenv!=20.21.1,>=20.0.24->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (4.3.6) Collecting jsonschema-specifications>=2023.03.6 (from jsonschema->ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached jsonschema_specifications-2024.10.1-py3-none-any.whl.metadata (3.0 kB) Collecting referencing>=0.28.4 (from jsonschema->ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached referencing-0.35.1-py3-none-any.whl.metadata (2.8 kB) Collecting rpds-py>=0.7.1 (from jsonschema->ray<2.11.0,>=2.10.0->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached rpds_py-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB) Collecting opencensus-context>=0.1.3 (from opencensus->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached opencensus_context-0.1.3-py2.py3-none-any.whl.metadata (3.3 kB) Collecting google-api-core<3.0.0,>=1.0.0 (from opencensus->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached google_api_core-2.21.0-py3-none-any.whl.metadata (2.8 kB) Collecting charset-normalizer<4,>=2 (from requests->kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (34 kB) Collecting wrapt (from smart-open->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB) Collecting googleapis-common-protos<2.0.dev0,>=1.56.2 (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached googleapis_common_protos-1.65.0-py2.py3-none-any.whl.metadata (1.5 kB) Collecting proto-plus<2.0.0dev,>=1.22.3 (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached proto_plus-1.24.0-py3-none-any.whl.metadata (2.2 kB) Collecting pyasn1<0.7.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes>=23.3.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) Using cached pyasn1-0.6.1-py3-none-any.whl.metadata (8.4 kB) Requirement already satisfied: propcache>=0.2.0 in ./my_venv/lib/python3.9/site-packages (from yarl<2.0,>=1.0->aiohttp>=3.7->ray[serve]<2.11.0,>=2.10.0->kserve==0.13.1->-r src/models/langid/././requirements.txt (line 1)) (0.2.0) Using cached kserve-0.13.1-py3-none-any.whl (452 kB) Using cached wheel-0.44.0-py3-none-any.whl (67 kB) Using cached cloudevents-1.11.0-py3-none-any.whl (55 kB) Using cached fastapi-0.109.2-py3-none-any.whl (92 kB) Using cached grpcio-1.66.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB) Using cached httpx-0.26.0-py3-none-any.whl (75 kB) Using cached httpcore-1.0.6-py3-none-any.whl (78 kB) Using cached kubernetes-31.0.0-py2.py3-none-any.whl (1.9 MB) Using cached numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB) Using cached orjson-3.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB) Using cached pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB) Using cached prometheus_client-0.20.0-py3-none-any.whl (54 kB) Using cached protobuf-3.20.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB) Using cached psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (288 kB) Using cached pybind11-2.13.6-py3-none-any.whl (243 kB) Using cached pydantic-2.9.2-py3-none-any.whl (434 kB) Using cached pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) Using cached ray-2.10.0-cp39-cp39-manylinux2014_x86_64.whl (65.1 MB) Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Using cached tabulate-0.9.0-py3-none-any.whl (35 kB) Using cached timing_asgi-0.3.1-py3-none-any.whl (5.6 kB) Using cached uvicorn-0.21.1-py3-none-any.whl (57 kB) Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB) Using cached certifi-2024.8.30-py3-none-any.whl (167 kB) Using cached click-8.1.7-py3-none-any.whl (97 kB) Using cached deprecation-2.1.0-py2.py3-none-any.whl (11 kB) Using cached durationpy-0.9-py3-none-any.whl (3.5 kB) Using cached google_auth-2.35.0-py2.py3-none-any.whl (208 kB) Using cached h11-0.14.0-py3-none-any.whl (58 kB) Using cached httptools-0.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (345 kB) Using cached msgpack-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (377 kB) Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB) Using cached py_spy-0.3.14-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.0 MB) Using cached python_dotenv-1.0.1-py3-none-any.whl (19 kB) Using cached pytz-2024.2-py2.py3-none-any.whl (508 kB) Using cached starlette-0.36.3-py3-none-any.whl (71 kB) Using cached anyio-4.6.0-py3-none-any.whl (89 kB) Using cached sniffio-1.3.1-py3-none-any.whl (10 kB) Using cached tzdata-2024.2-py2.py3-none-any.whl (346 kB) Using cached urllib3-2.2.3-py3-none-any.whl (126 kB) Using cached uvloop-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB) Using cached virtualenv-20.26.6-py3-none-any.whl (6.0 MB) Using cached filelock-3.16.1-py3-none-any.whl (16 kB) Using cached watchfiles-0.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB) Using cached websocket_client-1.8.0-py3-none-any.whl (58 kB) Using cached websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (163 kB) Using cached aiohttp_cors-0.7.0-py3-none-any.whl (27 kB) Using cached colorful-0.5.6-py2.py3-none-any.whl (201 kB) Using cached jsonschema-4.23.0-py3-none-any.whl (88 kB) Using cached opencensus-0.11.4-py2.py3-none-any.whl (128 kB) Using cached packaging-24.1-py3-none-any.whl (53 kB) Using cached requests-2.32.3-py3-none-any.whl (64 kB) Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB) Using cached smart_open-7.0.5-py3-none-any.whl (61 kB) Using cached cachetools-5.5.0-py3-none-any.whl (9.5 kB) Using cached charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (144 kB) Using cached distlib-0.3.9-py2.py3-none-any.whl (468 kB) Using cached exceptiongroup-1.2.2-py3-none-any.whl (16 kB) Using cached google_api_core-2.21.0-py3-none-any.whl (156 kB) Using cached jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB) Using cached opencensus_context-0.1.3-py2.py3-none-any.whl (5.1 kB) Using cached pyasn1_modules-0.4.1-py3-none-any.whl (181 kB) Using cached referencing-0.35.1-py3-none-any.whl (26 kB) Using cached rpds_py-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (355 kB) Using cached rsa-4.9-py3-none-any.whl (34 kB) Using cached wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB) Using cached googleapis_common_protos-1.65.0-py2.py3-none-any.whl (220 kB) Using cached proto_plus-1.24.0-py3-none-any.whl (50 kB) Using cached pyasn1-0.6.1-py3-none-any.whl (83 kB) Installing collected packages: pytz, py-spy, opencensus-context, durationpy, distlib, colorful, wrapt, wheel, websockets, websocket-client, uvloop, urllib3, tzdata, timing-asgi, tabulate, sniffio, six, rpds-py, python-dotenv, pydantic-core, pybind11, pyasn1, psutil, protobuf, prometheus-client, packaging, orjson, oauthlib, numpy, msgpack, httptools, h11, grpcio, filelock, exceptiongroup, click, charset-normalizer, certifi, cachetools, annotated-types, virtualenv, uvicorn, smart-open, rsa, requests, referencing, python-dateutil, pydantic, pyasn1-modules, proto-plus, httpcore, googleapis-common-protos, fasttext, deprecation, anyio, watchfiles, starlette, requests-oauthlib, pandas, jsonschema-specifications, httpx, google-auth, cloudevents, kubernetes, jsonschema, google-api-core, fastapi, aiohttp-cors, ray, opencensus, kserve Attempting uninstall: numpy Found existing installation: numpy 2.0.2 Uninstalling numpy-2.0.2: Successfully uninstalled numpy-2.0.2 Successfully installed aiohttp-cors-0.7.0 annotated-types-0.7.0 anyio-4.6.0 cachetools-5.5.0 certifi-2024.8.30 charset-normalizer-3.4.0 click-8.1.7 cloudevents-1.11.0 colorful-0.5.6 deprecation-2.1.0 distlib-0.3.9 durationpy-0.9 exceptiongroup-1.2.2 fastapi-0.109.2 fasttext-0.9.3 filelock-3.16.1 google-api-core-2.21.0 google-auth-2.35.0 googleapis-common-protos-1.65.0 grpcio-1.66.2 h11-0.14.0 httpcore-1.0.6 httptools-0.6.1 httpx-0.26.0 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 kserve-0.13.1 kubernetes-31.0.0 msgpack-1.1.0 numpy-1.26.4 oauthlib-3.2.2 opencensus-0.11.4 opencensus-context-0.1.3 orjson-3.10.7 packaging-24.1 pandas-2.2.3 prometheus-client-0.20.0 proto-plus-1.24.0 protobuf-3.20.3 psutil-5.9.8 py-spy-0.3.14 pyasn1-0.6.1 pyasn1-modules-0.4.1 pybind11-2.13.6 pydantic-2.9.2 pydantic-core-2.23.4 python-dateutil-2.9.0.post0 python-dotenv-1.0.1 pytz-2024.2 ray-2.10.0 referencing-0.35.1 requests-2.32.3 requests-oauthlib-2.0.0 rpds-py-0.20.0 rsa-4.9 six-1.16.0 smart-open-7.0.5 sniffio-1.3.1 starlette-0.36.3 tabulate-0.9.0 timing-asgi-0.3.1 tzdata-2024.2 urllib3-2.2.3 uvicorn-0.21.1 uvloop-0.20.0 virtualenv-20.26.6 watchfiles-0.24.0 websocket-client-1.8.0 websockets-13.1 wheel-0.44.0 wrapt-1.16.0 MODEL_PATH=models/langid/lid201-model.bin MODEL_NAME=langid \ \ my_venv/bin/python src/models/langid/./model.py \
Oct 9 2024
Oct 2 2024
Sep 25 2024
would you be able to update rec-api in production to include the patch above? This is a bit time sensitive. Thanks!
Hi @SBisson, the patch for concurrency and error handling to fetch section suggestions has been deployed in production.
Sep 23 2024
The request highlighted in T374387#10162411, seems to have been the one sending a wrongly encoded URL to the cxserver. To avoid hitting the cache, I ran a version of this request (shown below) and it returned results without an error:
$ time curl "https://recommendation-api-ng.discovery.wmnet:31443/service/lw/recommendation/api/v1/translation/sections?source=en&target=vi&topic=society&count=6" [{"source_title":"Grammy Awards","target_title":"Giải Grammy","source_sections":["History","Gramophone trophy","Ceremonies","Categories","Entry process and selection of nominees","Final voting","Certificates","Special honors","Venue","Leading winners","Criticism","TV broadcasts and ratings","See also","Footnotes","References","External links"],"target_sections":["Lịch sử","Tên gọi","Lễ trao giải","Cúp Grammy","Các hạng mục","Quá trình ứng cử và bầu chọn","Bỏ phiếu","Địa điểm tổ chức","Kỷ lục","Chỉ trích","Truyền hình và tỷ suất người xem","Chú thích","Liên kết ngoài"],"present":{"History":"Lịch sử","Criticism":"Chỉ trích","Footnotes":"Chú thích","References":"Chú thích","External links":"Liên kết ngoài"},"missing":{"Ceremonies":"Hình thức","Categories":"Phân loại","Venue":"Địa điểm thi đấu","See also":"Xem thêm","Gramophone trophy":"Gramophone trophy","Entry process and selection of nominees":"Entry process and selection of nominees","Final voting":"Final voting","Certificates":"Certificates","Special honors":"Special honors","Leading winners":"Leading winners","TV broadcasts and ratings":"TV broadcasts and ratings"}},{"source_title":"Leo Tolstoy","target_title":"Lev Nikolayevich Tolstoy","source_sections":["Origins","Life and career","Personal life","Novels and fictional works","Critical appraisal by other authors","Ethical, political and religious beliefs","Death","Legacy","Bibliography","See also","Notes","References","Bibliography","Further reading","External links"],"target_sections":["Tiểu sử","Sự nghiệp","Tôn giáo và đức tin chính trị","Xem thêm","Tham khảo","Liên kết ngoài"],"present":{"See also":"Xem thêm","Notes":"Tham khảo","References":"Tham khảo","External links":"Liên kết ngoài"},"missing":{"Origins":"Nguồn gốc","Life and career":"Cuộc đời và sự nghiệp","Personal life":"Đời tư","Death":"Qua đời","Legacy":"Di sản","Bibliography":"Tài liệu","Further reading":"Đọc thêm","Novels and fictional works":"Novels and fictional works","Critical appraisal by other authors":"Critical appraisal by other authors","Ethical, political and religious beliefs":"Ethical, political and religious beliefs"}},{"source_title":"Qatar","target_title":"Qatar","source_sections":["Etymology","History","Politics","Administrative divisions","Geography","Economy","Demographics","Culture","Education","See also","References","Further reading","External links"],"target_sections":["Khởi nguyên","Lịch sử","Chính trị","Địa lý","Hành chính","Kinh tế","Nhân khẩu","Văn hoá","Giáo dục","Xem thêm","Ghi chú","Tham khảo","Liên kết ngoài"],"present":{"History":"Lịch sử","Politics":"Chính trị","Geography":"Địa lý","Economy":"Kinh tế","Education":"Giáo dục","See also":"Xem thêm","References":"Tham khảo","External links":"Liên kết ngoài"},"missing":{"Etymology":"Từ nguyên","Administrative divisions":"Khu vực hành chính","Demographics":"Dân cư","Culture":"Văn hóa","Further reading":"Đọc thêm"}},{"source_title":"Al Gore","target_title":"Al Gore","source_sections":["Early life and education","Military service and early career (1969–1976)","Congress (1977–1993)","First presidential run (1988)","1992 presidential election","Vice presidency (1993–2001)","Second presidential run (2000)","Post-vice presidency (2001–present)","Personal life","Awards and honors","Selected publications","See also","Notes","References","Bibliography","External links"],"target_sections":["Thiếu thời","Sự nghiệp Chính trị (1976 – 2000)","Sau nhiệm kỳ Phó Tổng thống","Kêu gọi Quan tâm đến Môi trường","Internet và Kỹ thuật","Gia đình","Xem thêm","Tác phẩm","Chú thích","Liên kết ngoài"],"present":{"See also":"Xem thêm","Notes":"Chú thích","References":"Chú thích","External links":"Liên kết ngoài"},"missing":{"Early life and education":"Tuổi thơ và giáo dục","Personal life":"Đời tư","Awards and honors":"Giải thưởng và vinh danh","Selected publications":"Ấn phẩm","Bibliography":"Tài liệu","Military service and early career (1969–1976)":"Military service and early career (1969–1976)","Congress (1977–1993)":"Congress (1977–1993)","First presidential run (1988)":"First presidential run (1988)","1992 presidential election":"1992 presidential election","Vice presidency (1993–2001)":"Vice presidency (1993–2001)","Second presidential run (2000)":"Second presidential run (2000)","Post-vice presidency (2001–present)":"Post-vice presidency (2001–present)"}},{"source_title":"Millennials","target_title":"Thế hệ Millennials","source_sections":["Terminology and etymology","Date and age range definitions","Psychology","Cognitive abilities","Cultural identity","Demographics","Economic prospects and trends","Education","Health and welfare","Political views and participation","Preferred modes of transport","Religious beliefs","Social tendencies","Workplace attitudes","Use of digital technology","See also","References","Further reading","External links"],"target_sections":["Xuất xứ tên gọi","Giới hạn năm và độ tuổi","Đặc điểm của thế hệ Millennials","Con cháu thế hệ Millennials","Ảnh hưởng của thế hệ Millennials đối với doanh nghiệp","Tham khảo"],"present":{"References":"Tham khảo"},"missing":{"Psychology":"Tâm lý học","Demographics":"Dân cư","Education":"Giáo dục","See also":"Xem thêm","Further reading":"Đọc thêm","External links":"Liên kết ngoài","Terminology and etymology":"Terminology and etymology","Date and age range definitions":"Date and age range definitions","Cognitive abilities":"Cognitive abilities","Cultural identity":"Cultural identity","Economic prospects and trends":"Economic prospects and trends","Health and welfare":"Health and welfare","Political views and participation":"Political views and participation","Preferred modes of transport":"Preferred modes of transport","Religious beliefs":"Religious beliefs","Social tendencies":"Social tendencies","Workplace attitudes":"Workplace attitudes","Use of digital technology":"Use of digital technology"}},{"source_title":"Generation Z","target_title":"Thế hệ Z","source_sections":["Etymology and nomenclature","Date and age range","Arts and culture","Demographics","Economic trends","Education","Health issues","Political views and participation","Religious tendencies","Risky behaviors","Family and social life","Use of information and communications technologies (ICT)","See also","Notes","References","Further reading","External links"],"target_sections":["Thuật ngữ","Giới hạn năm và độ tuổi","Đặc điểm chung của thế hệ","Nhân khẩu học","Giáo dục","Triển vọng việc làm và xu hướng kinh tế","Sử dụng công nghệ thông tin và truyền thông","Xem thêm","Chú thích"],"present":{"Education":"Giáo dục","See also":"Xem thêm","Notes":"Chú thích","References":"Chú thích"},"missing":{"Demographics":"Dân cư","Health issues":"Vấn đề sức khỏe","Further reading":"Đọc thêm","External links":"Liên kết ngoài","Etymology and nomenclature":"Etymology and nomenclature","Date and age range":"Date and age range","Arts and culture":"Arts and culture","Economic trends":"Economic trends","Political views and participation":"Political views and participation","Religious tendencies":"Religious tendencies","Risky behaviors":"Risky behaviors","Family and social life":"Family and social life","Use of information and communications technologies (ICT)":"Use of information and communications technologies (ICT)"}}] real 0m1.460s user 0m0.011s sys 0m0.004s
Sep 19 2024
This prototype is based on the Research Team's implementation of the Article Country model Flask API. It currently uses 2 items (wikidata properties and categories) to generate the prediction shown below:
>>> import model Loaded 250 QID-region pairs for matching against Wikidata -- e.g., Q31: Belgium Now 304 QID-region pairs after adding aggregations -- e.g., Q40362: Western Sahara Skipping geometry for: Dhekelia (Q9206745) Skipping geometry for: UNDOF Zone (Q1428532) Skipping geometry for: Korean DMZ (south) (Q331990) Skipping geometry for: Korean DMZ (north) (Q331990) Skipping geometry for: Iraqi Kurdistan (Q205047) Skipping geometry for: USNB Guantanamo Bay (Q762570) Skipping geometry for: N. Cyprus (Q23681) Skipping geometry for: Cyprus U.N. Buffer Zone (Q116970) Skipping geometry for: Siachen Glacier (Q333946) Skipping geometry for: Akrotiri (Q9143535) Skipping geometry for: Paracel Is. (Q274388) Skipping geometry for: Spratly Is. (Q215664) Skipping geometry for: Clipperton I. (Q161258) Skipping geometry for: Bajo Nuevo Bank (Q1257783) Skipping geometry for: Serranilla Bank (Q1169008) Skipping geometry for: Scarborough Reef (Q628716) Invalid category country: <Heard Island and McDonald Islands> Invalid category country: <Heard Island and McDonald Islands> Invalid category country: <Heard Island and McDonald Islands> Invalid category country: <Heard Island and McDonald Islands> Invalid category country: <Heard Island and McDonald Islands> >>> >>> >>> >>> model.get_regions(lang="en", title="Toni_Morrison") {'qid': 'Q72334', 'countries': ['United States'], 'wikidata': [{'P27': 'country of citizenship', 'country': 'United States'}], 'categories': [{'country': 'United States', 'categories': 'Category:21st-century American women writers'}]}
The Flask API on CloudVPS uses 3 items (wikilinks, wikidata properties, and categories) to return the prediction shown below:
$ curl "https://wiki-region.wmcloud.org/regions?lang=en&title=Toni_Morrison" {"qid":"Q72334","countries":["United States"],"wikidata":[{"P27":"country of citizenship","country":"United States"}],"links":[{"country":"United States","count":292,"prop-tfidf":0.6543743044707853},{"country":"United Kingdom","count":7,"prop-tfidf":0.024977794113142826},{"country":"France","count":6,"prop-tfidf":0.01121014426169255},{"country":"Canada","count":3,"prop-tfidf":0.014150509969677481},{"country":"Sweden","count":2,"prop-tfidf":0.010628196881987198},{"country":"Germany","count":2,"prop-tfidf":0.007437695896760495},{"country":"Italy","count":2,"prop-tfidf":0.00524263121892452},{"country":"Tanzania","count":1,"prop-tfidf":0.006896586929666045},{"country":"Russia","count":1,"prop-tfidf":0.0032951494175421404},{"country":"Mexico","count":1,"prop-tfidf":0.0031956057868030674},{"country":"Kenya","count":1,"prop-tfidf":0.006797043298926971},{"country":"South Africa","count":1,"prop-tfidf":0.005993037050649842},{"country":"Norway","count":1,"prop-tfidf":0.005372803659121771},{"country":"Philippines","count":1,"prop-tfidf":0.006120657090058911},{"country":"Switzerland","count":1,"prop-tfidf":0.005349832052028138},{"country":"Spain","count":1,"prop-tfidf":0.003795419972025688},{"country":"Taiwan","count":1,"prop-tfidf":0.0064779932004043},{"country":"Nigeria","count":1,"prop-tfidf":0.006768966890256978},{"country":"India","count":1,"prop-tfidf":0.004288033324144691},{"country":"Poland","count":1,"prop-tfidf":0.004522854196657377},{"country":"Lithuania","count":1,"prop-tfidf":0.0065341460177442915},{"country":"Saint Lucia","count":1,"prop-tfidf":0.007304971055775064},{"country":"Uruguay","count":1,"prop-tfidf":0.007511715519617754},{"country":"Haiti","count":1,"prop-tfidf":0.00813960611351037},{"country":"El Salvador","count":1,"prop-tfidf":0.008341245775776697}],"categories":[{"country":"United States","categories":"Category:21st-century American women writers"}]}
The CloudVPS instance depends on an SQLite database to make a circular dependency prediction using wikilinks. For the LiftWing instance, the Research team recommended not to use the 715MB database and instead rely on the Search index that will be getting predictions from an event stream.
Sep 17 2024
Closing this task as we completed migrating the content translation recommendation API to LiftWing, and the Language Team is making improvements to it in T369484: Modernize recommendation API.
Sep 16 2024
Sep 5 2024
This Makefile has been added and can used as shown below:
# ssh into a statbox then clone the LW isvc repo $ ssh stat1008.eqiad.wmnet $ git clone https://github.com/wikimedia/machinelearning-liftwing-inference-services.git $ cd machinelearning-liftwing-inference-services/test/locust # build load test environment and run tests for logo_detection isvc $ MODEL_LOCUST_DIR="logo_detection" make run-locust-test # delete the load test environment $ make clean
Sep 4 2024
Sep 3 2024
Sep 2 2024
The logo-detection model-server is now up and running in LiftWing production as shown in T370757#10027062
Aug 23 2024
Hi @matthiasmullie, I have tried to reproduce this issue by accessing k8s-mwdebug through the REPL. As shown below, I was able to get a response from the logo-detection endpoint. However, when I tried to access upload.wikimedia.org, I ran into an error similar to the one you reported: Failed to connect to upload.wikimedia.org port 443: Connection timed out.
Aug 21 2024
@klausman thank you for updating the trim prefix in the API GW config. @santhosh, the modernized recommendation-api is now up and running in LiftWing production:
1.Interactive documentation:
2.Grafana dashboard:
3.External endpoint:
$ time curl "https://api.wikimedia.org/service/lw/recommendation/api/v1/translation?source=en&target=fr&count=3&seed=Apple" [{"title":"Flamenco (apple)","pageviews":0,"wikidata_id":"Q19597233","rank":7.0,"langlinks_count":1},{"title":"Applecrab","pageviews":0,"wikidata_id":"Q19595924","rank":9.0,"langlinks_count":0},{"title":"Malus × zumi","pageviews":0,"wikidata_id":"Q5990804","rank":19.0,"langlinks_count":3}] real 0m2.838s user 0m0.048s sys 0m0.008s
4.Internal endpoint:
$ time curl "https://recommendation-api-ng.discovery.wmnet:31443/service/lw/recommendation/api/v1/translation?source=en&target=fr&count=3&seed=Apple" [{"title":"Flamenco (apple)","pageviews":0,"wikidata_id":"Q19597233","rank":7.0,"langlinks_count":1},{"title":"Applecrab","pageviews":0,"wikidata_id":"Q19595924","rank":9.0,"langlinks_count":0},{"title":"Malus × zumi","pageviews":0,"wikidata_id":"Q5990804","rank":19.0,"langlinks_count":3}] real 0m1.001s user 0m0.013s sys 0m0.000s