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

[WIP] FIX for Ascii decode error when reading file using python inside docker #1070

Closed

Conversation

rishabh1212
Copy link

@rishabh1212 rishabh1212 commented May 18, 2021

Description

Following similar fix https://github.com/aws/deep-learning-containers/blob/master/pytorch/inference/docker/1.8/py3/Dockerfile.cpu#L14

When executing python script while opening file in read mode containing non-ascii chars give

Traceback (most recent call last):
  File "src/data_exploration/data_explore.py", line 39, in <module>
    query = f.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 310: ordinal not in range(128)

Fixes #821

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Feature/Issue validation/testing

  1. Build docker image
DOCKER_BUILDKIT=1 docker build --file Dockerfile --build-arg BASE_IMAGE=nvidia/cuda:10.2-cudnn7-runtime-ubuntu18.04 -t torchserve:gpu .
  1. Read a file containing Japanese characters using python, No ascii decode error anymore
    test.txt
# 左連接ID left context id
(base) ➜  docker git:(fix_821_ascii_decode_error) ✗ docker run --net=host -e AWS_DEFAULT_REGION=ap-northeast-1 -it torchserve:gpu bash
model-server@docker-desktop:~$ python
Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> open('test.txt').read()
'# 左連接ID left context id\n'
>>> 
  • Logs

Checklist:

  • Have you added tests that prove your fix is effective or that this feature works?
  • New and existing unit tests pass locally with these changes?

@rishabh1212 rishabh1212 changed the title Ascii decode error when reading file using python inside docker FIX for Ascii decode error when reading file using python inside docker May 18, 2021
@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-cpu
  • Commit ID: 690c717
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-cpu
  • Commit ID: 42dcaf3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-gpu
  • Commit ID: 42dcaf3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-win
  • Commit ID: 42dcaf3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-win
  • Commit ID: 690c717
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-gpu
  • Commit ID: 690c717
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rishabh1212
Copy link
Author

@msaroufim @lxning @dhanainme I have made changes fixing #821 and possibly #943. Please check

@msaroufim
Copy link
Member

Very cool! Nice, simple and very useful improvement

So before we can merge this we need to make sure it runs as expected and doesn't break existing functionality so let's run these tests where you build the image from scratch and then execute python test/regression_tests.py https://github.com/pytorch/serve/tree/master/test

It's also useful to have a screenshot showing an inference working fine in English vs a UTF-8 encoded language that way the improvement can be seen and no regressions detected

Also just double checking was the issue around UTF-8 encoded languages only present in Docker? Would be good to have support regardless of environment

@rishabh1212
Copy link
Author

Docker building logs and install dependencies

(base) ➜  docker git:(fix_821_ascii_decode_error) ./build_image.sh -bt dev   
[+] Building 503.8s (9/12)                                                                                                          
 => [internal] load build definition from Dockerfile.dev                                                                       0.3s
 => => transferring dockerfile: 3.50kB                                                                                         0.0s
 => [internal] load .dockerignore                                                                                              0.2s
 => => transferring context: 2B                                                                                                0.0s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                          3.3s
 => docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78  8.6s
 => => resolve docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496f  0.0s
 => => sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 1.69kB / 1.69kB                                 0.0s
 => => sha256:3c244c0c6fc9d6aa3ddb73af4264b3a23597523ac553294218c13735a2c6cf79 528B / 528B                                     0.0s
 => => sha256:b587adb6abfd8d6c87b1f649c2e924d53f148ae1c7f0ceaaded70b27b44dccb5 1.21kB / 1.21kB                                 0.0s
 => => sha256:d7f0373ffb1d5ac3477b10ab7f91cba7c5df586c72e7e4a12649024efdc0d531 9.64MB / 9.64MB                                 8.2s
[+] Building 504.0s (9/12)                                                                                                          
 => [internal] load metadata for docker.io/library/ubuntu:18.04                                                                2.6s
 => [compile-image 1/4] FROM docker.io/library/ubuntu:18.04@sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaec  24.0s
 => => resolve docker.io/library/ubuntu:18.04@sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaecb0d72fb          0.0s
 => => sha256:81bcf752ac3dc8a12d54908ecdfe98a857c84285e5d50bed1d10f9812377abd6 3.32kB / 3.32kB                                 0.0s
 => => sha256:4bbfd2c87b7524455f144a03bf387c88b6d4200e5e0df9139a9d5e79110f89ca 26.70MB / 26.70MB                              22.6s
 => => sha256:d2e110be24e168b42c1a2ddbc4a476a217b73cccdba69cdcb212b812a88f5726 857B / 857B                                     1.0s
 => => sha256:889a7173dcfeb409f9d88054a97ab2445f5a799a823f719a5573365ee3662b6f 189B / 189B                                     1.1s
 => => sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaecb0d72fb 1.41kB / 1.41kB                                 0.0s
 => => sha256:ceed028aae0eac7db9dd33bd89c14d5a9991d73443b0de24ba0db250f47491d2 943B / 943B                                     0.0s
 => => extracting sha256:4bbfd2c87b7524455f144a03bf387c88b6d4200e5e0df9139a9d5e79110f89ca                                      1.1s
 => => extracting sha256:d2e110be24e168b42c1a2ddbc4a476a217b73cccdba69cdcb212b812a88f5726                                      0.0s
[+] Building 1099.0s (13/13) FINISHED                                                                                               
 => [internal] load build definition from Dockerfile.dev                                                                       0.3s
 => => transferring dockerfile: 3.50kB                                                                                         0.0s 
 => [internal] load .dockerignore                                                                                              0.2s 
 => => transferring context: 2B                                                                                                0.0s 
 => resolve image config for docker.io/docker/dockerfile:experimental                                                          3.3s 
 => docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78  8.6s 
 => => resolve docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496f  0.0s 
 => => sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 1.69kB / 1.69kB                                 0.0s 
 => => sha256:3c244c0c6fc9d6aa3ddb73af4264b3a23597523ac553294218c13735a2c6cf79 528B / 528B                                     0.0s 
 => => sha256:b587adb6abfd8d6c87b1f649c2e924d53f148ae1c7f0ceaaded70b27b44dccb5 1.21kB / 1.21kB                                 0.0s 
 => => sha256:d7f0373ffb1d5ac3477b10ab7f91cba7c5df586c72e7e4a12649024efdc0d531 9.64MB / 9.64MB                                 8.2s 
 => => extracting sha256:d7f0373ffb1d5ac3477b10ab7f91cba7c5df586c72e7e4a12649024efdc0d531                                      0.2s 
 => [internal] load metadata for docker.io/library/ubuntu:18.04                                                                2.6s 
 => [compile-image 1/4] FROM docker.io/library/ubuntu:18.04@sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaec  24.0s 
 => => resolve docker.io/library/ubuntu:18.04@sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaecb0d72fb          0.0s 
 => => sha256:81bcf752ac3dc8a12d54908ecdfe98a857c84285e5d50bed1d10f9812377abd6 3.32kB / 3.32kB                                 0.0s 
 => => sha256:4bbfd2c87b7524455f144a03bf387c88b6d4200e5e0df9139a9d5e79110f89ca 26.70MB / 26.70MB                              22.6s 
 => => sha256:d2e110be24e168b42c1a2ddbc4a476a217b73cccdba69cdcb212b812a88f5726 857B / 857B                                     1.0s
 => => sha256:889a7173dcfeb409f9d88054a97ab2445f5a799a823f719a5573365ee3662b6f 189B / 189B                                     1.1s
 => => sha256:04919776d30640ce4ed24442d5f7c1a8e4bd0e4793ed9469843cedaecb0d72fb 1.41kB / 1.41kB                                 0.0s
 => => sha256:ceed028aae0eac7db9dd33bd89c14d5a9991d73443b0de24ba0db250f47491d2 943B / 943B                                     0.0s
 => => extracting sha256:4bbfd2c87b7524455f144a03bf387c88b6d4200e5e0df9139a9d5e79110f89ca                                      1.1s
 => => extracting sha256:d2e110be24e168b42c1a2ddbc4a476a217b73cccdba69cdcb212b812a88f5726                                      0.0s
 => => extracting sha256:889a7173dcfeb409f9d88054a97ab2445f5a799a823f719a5573365ee3662b6f                                      0.0s
 => [compile-image 2/4] RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt     apt-get update &&     DEBIAN_FRONTEND=n  446.6s
 => [compile-image 3/4] RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1     && update-alternative  0.3s
 => [compile-image 4/4] RUN pip install -U pip setuptools                                                                      1.4s
 => [dev-image 1/2] RUN if [ "cpu" = "gpu" ]; then export USE_CUDA=1; fi     && git clone https://github.com/pytorch/serve.  601.7s
 => [dev-image 2/2] WORKDIR /home/model-server                                                                                 0.0s 
 => [final-image 1/1] RUN echo "dev image creation completed"                                                                  0.3s 
 => exporting to image                                                                                                         9.6s 
 => => exporting layers                                                                                                        9.6s
 => => writing image sha256:c4908e71ae6a443fd376f580d96900a82d05b67fd1e7b9870515c9ee4c48cda1                                   0.0s
 => => naming to docker.io/pytorch/torchserve:dev-cpu                                                                          0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
(base) ➜  docker git:(fix_821_ascii_decode_error) docker run -it --user root pytorch/torchserve:dev-cpu /bin/bashroot@6bfaf26207e7:/home/model-server# apt-get update 
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease             
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease   
Hit:3 https://deb.nodesource.com/node_14.x bionic InRelease             
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease         
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done                      
root@6bfaf26207e7:/home/model-server# apt-get install -y git wget sudo 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.17.1-1ubuntu0.8).
sudo is already the newest version (1.8.21p2-3ubuntu1.4).
wget is already the newest version (1.19.4-1ubuntu2.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@6bfaf26207e7:/home/model-server# git clone https://github.com/pytorch/serve
Cloning into 'serve'...
remote: Enumerating objects: 20270, done.
remote: Counting objects: 100% (951/951), done.
remote: Compressing objects: 100% (401/401), done.
remote: Total 20270 (delta 571), reused 856 (delta 525), pack-reused 19319
Receiving objects: 100% (20270/20270), 43.06 MiB | 1.10 MiB/s, done.
Resolving deltas: 100% (11748/11748), done.
root@6bfaf26207e7:/home/model-server# python ts_scripts/install_dependencies.py --environment=dev
python: can't open file 'ts_scripts/install_dependencies.py': [Errno 2] No such file or directory
root@6bfaf26207e7:/home/model-server# cd serve/
root@6bfaf26207e7:/home/model-server/serve# python ts_scripts/install_dependencies.py --environment=dev
Hit:1 https://deb.nodesource.com/node_14.x bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                       
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                 
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openjdk-11-jdk is already the newest version (11.0.11+9-0ubuntu2~18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sh: 1: conda: not found
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Requirement already satisfied: torch==1.8.1+cpu in /usr/local/lib/python3.6/dist-packages (from -r requirements/torch_linux.txt (line 3)) (1.8.1+cpu)
Requirement already satisfied: torchvision==0.9.1+cpu in /usr/local/lib/python3.6/dist-packages (from -r requirements/torch_linux.txt (line 4)) (0.9.1+cpu)
Requirement already satisfied: torchtext==0.9.1 in /usr/local/lib/python3.6/dist-packages (from -r requirements/torch_linux.txt (line 5)) (0.9.1)
Requirement already satisfied: torchaudio==0.8.1 in /usr/local/lib/python3.6/dist-packages (from -r requirements/torch_linux.txt (line 6)) (0.8.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from torch==1.8.1+cpu->-r requirements/torch_linux.txt (line 3)) (1.19.5)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.6/dist-packages (from torch==1.8.1+cpu->-r requirements/torch_linux.txt (line 3)) (3.10.0.0)
Requirement already satisfied: dataclasses in /usr/local/lib/python3.6/dist-packages (from torch==1.8.1+cpu->-r requirements/torch_linux.txt (line 3)) (0.8)
Requirement already satisfied: pillow>=4.1.1 in /usr/local/lib/python3.6/dist-packages (from torchvision==0.9.1+cpu->-r requirements/torch_linux.txt (line 4)) (8.2.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (4.60.0)
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (2.25.1)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext==0.9.1->-r requirements/torch_linux.txt (line 5)) (2020.12.5)
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
Requirement already satisfied: pip in /usr/local/lib/python3.6/dist-packages (21.1.1)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (56.2.0)
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
Ignoring numpy: markers 'sys_platform == "win32"' don't match your environment
Ignoring nvgpu: markers 'sys_platform == "win32"' don't match your environment
Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 1)) (0.18.2)
Requirement already satisfied: psutil in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 2)) (5.8.0)
Requirement already satisfied: wheel in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 3)) (0.36.2)
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 4)) (2.25.1)
Requirement already satisfied: sentencepiece in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 5)) (0.1.95)
Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 6)) (8.2.0)
Requirement already satisfied: captum in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 7)) (0.3.1)
Requirement already satisfied: packaging in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 8)) (20.9)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from -r requirements/common.txt (line 9)) (1.19.5)
Requirement already satisfied: mock in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 2)) (4.0.3)
Requirement already satisfied: pytest in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 3)) (6.2.4)
Requirement already satisfied: pylint==2.6.0 in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 4)) (2.6.0)
Requirement already satisfied: pytest-mock in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 5)) (3.6.1)
Requirement already satisfied: pytest-cov in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 6)) (2.12.0)
Requirement already satisfied: nvgpu in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 7)) (0.9.0)
Requirement already satisfied: grpcio in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 9)) (1.38.0)
Requirement already satisfied: protobuf in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 10)) (3.17.0)
Requirement already satisfied: grpcio-tools in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 11)) (1.38.0)
Requirement already satisfied: transformers==4.6.0 in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 12)) (4.6.0)
Requirement already satisfied: pygit2 in /usr/local/lib/python3.6/dist-packages (from -r requirements/developer.txt (line 13)) (1.5.0)
Requirement already satisfied: isort<6,>=4.2.5 in /usr/local/lib/python3.6/dist-packages (from pylint==2.6.0->-r requirements/developer.txt (line 4)) (5.8.0)
Requirement already satisfied: mccabe<0.7,>=0.6 in /usr/local/lib/python3.6/dist-packages (from pylint==2.6.0->-r requirements/developer.txt (line 4)) (0.6.1)
Requirement already satisfied: astroid<=2.5,>=2.4.0 in /usr/local/lib/python3.6/dist-packages (from pylint==2.6.0->-r requirements/developer.txt (line 4)) (2.5)
Requirement already satisfied: toml>=0.7.1 in /usr/local/lib/python3.6/dist-packages (from pylint==2.6.0->-r requirements/developer.txt (line 4)) (0.10.2)
Requirement already satisfied: huggingface-hub==0.0.8 in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (0.0.8)
Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (4.60.0)
Requirement already satisfied: tokenizers<0.11,>=0.10.1 in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (0.10.2)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (2021.4.4)
Requirement already satisfied: filelock in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (3.0.12)
Requirement already satisfied: dataclasses in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (0.8)
Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (4.0.1)
Requirement already satisfied: sacremoses in /usr/local/lib/python3.6/dist-packages (from transformers==4.6.0->-r requirements/developer.txt (line 12)) (0.0.45)
Requirement already satisfied: wrapt<1.13,>=1.11 in /usr/local/lib/python3.6/dist-packages (from astroid<=2.5,>=2.4.0->pylint==2.6.0->-r requirements/developer.txt (line 4)) (1.12.1)
Requirement already satisfied: lazy-object-proxy>=1.4.0 in /usr/local/lib/python3.6/dist-packages (from astroid<=2.5,>=2.4.0->pylint==2.6.0->-r requirements/developer.txt (line 4)) (1.6.0)
Requirement already satisfied: typed-ast<1.5,>=1.4.0 in /usr/local/lib/python3.6/dist-packages (from astroid<=2.5,>=2.4.0->pylint==2.6.0->-r requirements/developer.txt (line 4)) (1.4.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->-r requirements/common.txt (line 4)) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->-r requirements/common.txt (line 4)) (4.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->-r requirements/common.txt (line 4)) (1.26.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->-r requirements/common.txt (line 4)) (2.10)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from captum->-r requirements/common.txt (line 7)) (3.3.4)
Requirement already satisfied: torch>=1.2 in /usr/local/lib/python3.6/dist-packages (from captum->-r requirements/common.txt (line 7)) (1.8.1+cpu)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.6/dist-packages (from torch>=1.2->captum->-r requirements/common.txt (line 7)) (3.10.0.0)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.6/dist-packages (from packaging->-r requirements/common.txt (line 8)) (2.4.7)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in /usr/local/lib/python3.6/dist-packages (from pytest->-r requirements/developer.txt (line 3)) (0.13.1)
Requirement already satisfied: attrs>=19.2.0 in /usr/local/lib/python3.6/dist-packages (from pytest->-r requirements/developer.txt (line 3)) (21.2.0)
Requirement already satisfied: iniconfig in /usr/local/lib/python3.6/dist-packages (from pytest->-r requirements/developer.txt (line 3)) (1.1.1)
Requirement already satisfied: py>=1.8.2 in /usr/local/lib/python3.6/dist-packages (from pytest->-r requirements/developer.txt (line 3)) (1.10.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata->transformers==4.6.0->-r requirements/developer.txt (line 12)) (3.4.1)
Requirement already satisfied: coverage[toml]>=5.2.1 in /usr/local/lib/python3.6/dist-packages (from pytest-cov->-r requirements/developer.txt (line 6)) (5.5)
Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (1.1.5)
Requirement already satisfied: flask-restful in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (0.3.9)
Requirement already satisfied: tabulate in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (0.8.9)
Requirement already satisfied: pynvml in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (8.0.4)
Requirement already satisfied: ansi2html in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (1.6.0)
Requirement already satisfied: flask in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (2.0.0)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (1.16.0)
Requirement already satisfied: termcolor in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (1.1.0)
Requirement already satisfied: arrow in /usr/local/lib/python3.6/dist-packages (from nvgpu->-r requirements/developer.txt (line 7)) (1.1.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from grpcio-tools->-r requirements/developer.txt (line 11)) (56.2.0)
Requirement already satisfied: cached-property in /usr/local/lib/python3.6/dist-packages (from pygit2->-r requirements/developer.txt (line 13)) (1.5.2)
Requirement already satisfied: cffi>=1.4.0 in /usr/local/lib/python3.6/dist-packages (from pygit2->-r requirements/developer.txt (line 13)) (1.14.5)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi>=1.4.0->pygit2->-r requirements/developer.txt (line 13)) (2.20)
Requirement already satisfied: python-dateutil>=2.7.0 in /usr/local/lib/python3.6/dist-packages (from arrow->nvgpu->-r requirements/developer.txt (line 7)) (2.8.1)
Requirement already satisfied: Jinja2>=3.0 in /usr/local/lib/python3.6/dist-packages (from flask->nvgpu->-r requirements/developer.txt (line 7)) (3.0.1)
Requirement already satisfied: click>=7.1.2 in /usr/local/lib/python3.6/dist-packages (from flask->nvgpu->-r requirements/developer.txt (line 7)) (8.0.1)
Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.6/dist-packages (from flask->nvgpu->-r requirements/developer.txt (line 7)) (2.0.1)
Requirement already satisfied: Werkzeug>=2.0 in /usr/local/lib/python3.6/dist-packages (from flask->nvgpu->-r requirements/developer.txt (line 7)) (2.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.6/dist-packages (from Jinja2>=3.0->flask->nvgpu->-r requirements/developer.txt (line 7)) (2.0.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from flask-restful->nvgpu->-r requirements/developer.txt (line 7)) (2021.1)
Requirement already satisfied: aniso8601>=0.82 in /usr/local/lib/python3.6/dist-packages (from flask-restful->nvgpu->-r requirements/developer.txt (line 7)) (9.0.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->captum->-r requirements/common.txt (line 7)) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->captum->-r requirements/common.txt (line 7)) (1.3.1)
Requirement already satisfied: joblib in /usr/local/lib/python3.6/dist-packages (from sacremoses->transformers==4.6.0->-r requirements/developer.txt (line 12)) (1.0.1)
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv

## Installing the NodeSource Node.js 14.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 https://deb.nodesource.com/node_14.x bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                 
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                 
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done

## Confirming "bionic" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/bionic/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null

## Creating apt sources list file for the NodeSource Node.js 14.x repo...

+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bionic main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bionic main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 https://deb.nodesource.com/node_14.x bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                 
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                    
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 14.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn


Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (14.17.0-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/usr/bin/markdown-link-check -> /usr/lib/node_modules/markdown-link-check/markdown-link-check
/usr/bin/newman -> /usr/lib/node_modules/newman/bin/newman.js
npm WARN [email protected] requires a peer of newman@4 but none is installed. You must install peer dependencies yourself.

+ [email protected]
+ [email protected]
+ [email protected]
updated 3 packages in 20.658s
Reading package lists... Done
Building dependency tree       
Reading state information... Done
wget is already the newest version (1.19.4-1ubuntu2.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

@rishabh1212
Copy link
Author

rishabh1212 commented May 22, 2021

@msaroufim I tried multiple times but, regression test on local is failing due to 507 error for test_MMF_activity_recognition_model_register_and_inference_on_valid_model for both master and this branch each time. I am not sure if this is related to my local or on every local. All other tests run fine

I debug and response was

(Pdb) response
<Response [507]>
(Pdb) response.json
<bound method Response.json of <Response [507]>>
(Pdb) response.json()
{'code': 507, 'type': 'InternalServerException', 'message': 'Worker died.'}

Logs
model_log.log

2021-05-22 19:10:28,163 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Listening on port: /home/model-server/tmp/.ts.sock.9000
2021-05-22 19:10:28,166 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - [PID]19682
2021-05-22 19:10:28,166 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Torch worker started.
2021-05-22 19:10:28,166 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Python runtime: 3.6.9
2021-05-22 19:10:28,185 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Connection accepted: /home/model-server/tmp/.ts.sock.9000.
2021-05-22 19:10:31,028 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - *********** config keyssss ********** dict_keys(['config_version', 'training', 'trainer', 'evaluation', 'model_config', 'dataset_config', 'datasets', 'model', 'config', 'run_type', 'optimizer', 'scheduler', 'env', 'distributed', 'checkpoint', 'multitasking', 'start_rank', 'device_id'])
2021-05-22 19:10:32,112 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139808348450152 acquired on /root/.cache/torch/transformers/4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517.lock
2021-05-22 19:10:32,853 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - 
2021-05-22 19:10:32,864 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - Downloading:   0%|          | 0.00/433 [00:00<?, ?B/s]
2021-05-22 19:10:32,864 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - Downloading: 100%|##########| 433/433 [00:00<00:00, 37.5kB/s]
2021-05-22 19:10:32,865 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139808348450152 released on /root/.cache/torch/transformers/4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517.lock
2021-05-22 19:10:33,232 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139811270461480 acquired on /root/.cache/torch/transformers/f2ee78bdd635b758cc0a12352586868bef80e47401abe4c4fcc3832421e7338b.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157.lock
2021-05-22 19:10:33,377 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - 
2021-05-22 19:11:13,941 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - Downloading: 100%|##########| 440M/440M [00:40<00:00, 10.9MB/s]
2021-05-22 19:11:13,943 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139811270461480 released on /root/.cache/torch/transformers/f2ee78bdd635b758cc0a12352586868bef80e47401abe4c4fcc3832421e7338b.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157.lock
2021-05-22 19:11:18,921 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - Downloading: "https://download.pytorch.org/models/r2plus1d_18-91a641e6.pth" to /root/.cache/torch/hub/checkpoints/r2plus1d_18-91a641e6.pth
2021-05-22 19:11:19,180 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - 
2021-05-22 19:11:31,157 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - 100%|##########| 120M/120M [00:11<00:00, 10.5MB/s]
2021-05-22 19:11:33,023 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139808322527072 acquired on /root/.cache/torch/transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084.lock
2021-05-22 19:11:33,811 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - 
2021-05-22 19:11:34,373 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - Downloading: 100%|##########| 232k/232k [00:00<00:00, 412kB/s]
2021-05-22 19:11:34,374 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Lock 139808322527072 released on /root/.cache/torch/transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084.lock
2021-05-22 19:11:34,425 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - /home/model-server/tmp/models/b031190405be4fda9c44beaed05e2538/torchaudio/functional/functional.py:358: UserWarning: At least one mel filterbank has all zero values. The value for `n_mels` (128) may be set too high. Or, the value for `n_freqs` (201) may be set too low.
2021-05-22 19:11:34,425 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG -   "At least one mel filterbank has all zero values. "
2021-05-22 19:11:35,461 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - ********* files in temp direcotry that .mar file got extracted ********* ['mmf-1.0.0rc12.dist-info', 'fsspec', 'torchvision.libs', 'yarl-1.6.3.dist-info', 'torchmetrics-0.3.2.dist-info', 'PIL', 'pyDeprecate-0.3.0.dist-info', 'chardet', 'regex-2021.4.4.dist-info', 'rsa-4.7.2.dist-info', 'oauthlib', 'grpc', 'google_auth_oauthlib', 'idna-2.10.dist-info', 'multiprocess', 'chardet-3.0.4.dist-info', 'torch-1.8.1.dist-info', 'wcwidth', 'kiwisolver-1.3.1.dist-info', 'numpy-1.19.5.dist-info', '_multiprocess', 'av.libs', 'mpl_toolkits', 'omegaconf-2.0.6.dist-info', 'av', 'bin', 'integrations', 'pyparsing.py', 'kiwisolver.cpython-36m-x86_64-linux-gnu.so', 'protobuf-3.17.0.dist-info', 'packaging-20.9.dist-info', 'psutil-5.8.0.dist-info', 'config.yaml', 'portalocker-2.3.0.dist-info', 'cycler.py', 'pyasn1', 'pyarrow-4.0.0.dist-info', 'Markdown-3.3.4.dist-info', 'nltk-3.4.5.dist-info', 'portalocker', 'MAR-INF', '_distutils_hack', 'ftfy', 'Pillow-8.2.0.dist-info', 'cycler-0.10.0.dist-info', 'scipy.libs', 'attrs-21.2.0.dist-info', 'typing_extensions-3.10.0.0.dist-info', '_yaml', 'filelock-3.0.12.dist-info', 'torch', 'pybind11', 'sentencepiece', 'gitdb-4.0.7.dist-info', 'packaging', 'sacremoses-0.0.45.dist-info', 'fasttext', 'pytorch_lightning', 'termcolor.py', 'certifi', 'google_auth-1.30.0.dist-info', 'datasets-1.2.1.dist-info', 'Werkzeug-2.0.1.dist-info', 'wheel', 'cachetools-4.2.2.dist-info', 'pylab.py', 'protobuf-3.17.0-py3.6-nspkg.pth', 'six.py', 'grpcio-1.38.0.dist-info', 'fsspec-2021.5.0.dist-info', 'click-8.0.1.dist-info', 'typing_extensions.py', 'tokenizers-0.9.2.dist-info', 'google_auth-1.30.0-py3.9-nspkg.pth', 'wheel-0.36.2.dist-info', 'future', 'requests', 'iopath-0.1.7.dist-info', 'torchvision-0.9.1.dist-info', 'absl', 'importlib_metadata-4.0.1.dist-info', 'psutil', 'cython.py', 'torchaudio', 'markdown', 'GitPython-3.1.0.dist-info', 'tqdm-4.49.0.dist-info', 'demjson.py', 'pandas', 'smmap', 'rsa', 'demjson-2.2.4.dist-info', 'pyasn1-0.4.8.dist-info', 'caffe2', 'sklearn-0.0.dist-info', 'setuptools', 'pybind11-2.6.2.dist-info', 'google', 'tensorboard_plugin_wit-1.8.0.dist-info', 'fasttext-0.9.1.dist-info', 'setuptools-56.2.0.dist-info', 'pyasn1_modules', 'Cython-0.29.23.dist-info', '__pycache__', 'requests_oauthlib-1.3.0.dist-info', 'future-0.18.2.dist-info', 'python_dateutil-2.8.1.dist-info', 'tensorboard_plugin_wit', 'torchmetrics', 'ftfy-5.8.dist-info', 'scipy-1.5.4.dist-info', 'idna_ssl.py', 'dataclasses-0.8.dist-info', 'zipp-3.4.1.dist-info', 'attr', 'sentencepiece-0.1.95.dist-info', 'idna', 'distutils-precedence.pth', 'six-1.16.0.dist-info', 'cachetools', 'click', 'dateutil', 'torchvision', 'tensorboard', 'scikit_learn.libs', 'pycocotools-2.0.2.dist-info', 'multiprocess-0.70.11.1.dist-info', 'iopath', 'requests_oauthlib', 'datasets', 'requirements.txt', 'torchtext', 'async_timeout', 'importlib_metadata', 'pytz-2021.1.dist-info', 'dill-0.3.3.dist-info', 'tokenizers', 'pandas-1.1.5.dist-info', 'numpy', 'joblib-1.0.1.dist-info', 'yarl', 'dataclasses.py', 'charades_action_lables.csv', 'pl_examples', 'matplotlib', 'fasttext_pybind.cpython-36m-x86_64-linux-gnu.so', 'deprecate', 'xxhash', 'google_auth_oauthlib-0.4.4.dist-info', 'past', 'tqdm', 'sacremoses', 'absl_py-0.12.0.dist-info', 'aiohttp', 'pycocotools', 'gitdb', 'lmdb-0.98.dist-info', 'dill', 'joblib', 'multidict-5.1.0.dist-info', 'editdistance', 'lmdb', 'scipy', 'pytorch_lightning-1.4.0.dev0.dist-info', 'idna_ssl-1.1.0.dist-info', 'urllib3', 'PyYAML-5.4.1.dist-info', 'numpy.libs', 'wcwidth-0.2.5.dist-info', 'mmf', 'handler.py', 'xxhash-2.0.2.dist-info', 'mmf_transformer_Charades_final.pth', 'regex', 'filelock.py', 'pyarrow', 'threadpoolctl-2.1.0.dist-info', 'async_timeout-3.0.1.dist-info', 'smmap-4.0.0.dist-info', 'pyasn1_modules-0.2.8.dist-info', 'threadpoolctl.py', 'pytz', 'nltk', 'transformers-3.4.0.dist-info', 'git', 'certifi-2020.12.5.dist-info', 'werkzeug', 'aiohttp-3.7.4.post0.dist-info', 'editdistance-0.5.3.dist-info', 'torchtext-0.5.0.dist-info', 'matplotlib-3.3.4.dist-info', 'yaml', 'pkg_resources', 'tests', 'pyparsing-2.4.7.dist-info', 'tensorboard-2.4.1.dist-info', 'mmf_cli', 'libpasteurize', 'urllib3-1.25.11.dist-info', 'termcolor-1.1.0.dist-info', 'Cython', 'requests-2.23.0.dist-info', 'av-8.0.3.dist-info', 'zipp.py', 'sklearn', 'matplotlib-3.3.4-py3.6-nspkg.pth', 'omegaconf', 'libfuturize', 'oauthlib-3.1.0.dist-info', 'Pillow.libs', 'pyximport', 'torchaudio-0.8.1.dist-info', 'scikit_learn-0.24.2.dist-info', 'transformers', 'multidict']
2021-05-22 19:11:36,959 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - /home/model-server/tmp/models/b031190405be4fda9c44beaed05e2538/torchvision/io/video.py:160: UserWarning: The pts_unit 'pts' gives wrong results and will be removed in a follow-up version. Please use pts_unit 'sec'.
2021-05-22 19:11:36,960 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG -   + "follow-up version. Please use pts_unit 'sec'."
2021-05-22 19:21:37,103 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Listening on port: /home/model-server/tmp/.ts.sock.9000
2021-05-22 19:21:37,106 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - [PID]26513
2021-05-22 19:21:37,110 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Torch worker started.
2021-05-22 19:21:37,111 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Python runtime: 3.6.9
2021-05-22 19:21:37,139 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Connection accepted: /home/model-server/tmp/.ts.sock.9000.
2021-05-22 19:21:39,512 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - *********** config keyssss ********** dict_keys(['config_version', 'training', 'trainer', 'evaluation', 'model_config', 'dataset_config', 'datasets', 'model', 'config', 'run_type', 'optimizer', 'scheduler', 'env', 'distributed', 'checkpoint', 'multitasking', 'start_rank', 'device_id'])
2021-05-22 19:21:48,004 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - /home/model-server/tmp/models/829e3783aa894562b996a158816190b8/torchaudio/functional/functional.py:358: UserWarning: At least one mel filterbank has all zero values. The value for `n_mels` (128) may be set too high. Or, the value for `n_freqs` (201) may be set too low.
2021-05-22 19:21:48,006 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG -   "At least one mel filterbank has all zero values. "
2021-05-22 19:21:49,529 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - ********* files in temp direcotry that .mar file got extracted ********* ['mmf-1.0.0rc12.dist-info', 'fsspec', 'torchvision.libs', 'yarl-1.6.3.dist-info', 'torchmetrics-0.3.2.dist-info', 'PIL', 'pyDeprecate-0.3.0.dist-info', 'chardet', 'regex-2021.4.4.dist-info', 'rsa-4.7.2.dist-info', 'oauthlib', 'grpc', 'google_auth_oauthlib', 'idna-2.10.dist-info', 'multiprocess', 'chardet-3.0.4.dist-info', 'torch-1.8.1.dist-info', 'wcwidth', 'kiwisolver-1.3.1.dist-info', 'numpy-1.19.5.dist-info', '_multiprocess', 'av.libs', 'mpl_toolkits', 'omegaconf-2.0.6.dist-info', 'av', 'bin', 'integrations', 'pyparsing.py', 'kiwisolver.cpython-36m-x86_64-linux-gnu.so', 'protobuf-3.17.0.dist-info', 'packaging-20.9.dist-info', 'psutil-5.8.0.dist-info', 'config.yaml', 'portalocker-2.3.0.dist-info', 'cycler.py', 'pyasn1', 'pyarrow-4.0.0.dist-info', 'Markdown-3.3.4.dist-info', 'nltk-3.4.5.dist-info', 'portalocker', 'MAR-INF', '_distutils_hack', 'ftfy', 'Pillow-8.2.0.dist-info', 'cycler-0.10.0.dist-info', 'scipy.libs', 'attrs-21.2.0.dist-info', 'typing_extensions-3.10.0.0.dist-info', '_yaml', 'filelock-3.0.12.dist-info', 'torch', 'pybind11', 'sentencepiece', 'gitdb-4.0.7.dist-info', 'packaging', 'sacremoses-0.0.45.dist-info', 'fasttext', 'pytorch_lightning', 'termcolor.py', 'certifi', 'google_auth-1.30.0.dist-info', 'datasets-1.2.1.dist-info', 'Werkzeug-2.0.1.dist-info', 'wheel', 'cachetools-4.2.2.dist-info', 'pylab.py', 'protobuf-3.17.0-py3.6-nspkg.pth', 'six.py', 'grpcio-1.38.0.dist-info', 'fsspec-2021.5.0.dist-info', 'click-8.0.1.dist-info', 'typing_extensions.py', 'tokenizers-0.9.2.dist-info', 'google_auth-1.30.0-py3.9-nspkg.pth', 'wheel-0.36.2.dist-info', 'future', 'requests', 'iopath-0.1.7.dist-info', 'torchvision-0.9.1.dist-info', 'absl', 'importlib_metadata-4.0.1.dist-info', 'psutil', 'cython.py', 'torchaudio', 'markdown', 'GitPython-3.1.0.dist-info', 'tqdm-4.49.0.dist-info', 'demjson.py', 'pandas', 'smmap', 'rsa', 'demjson-2.2.4.dist-info', 'pyasn1-0.4.8.dist-info', 'caffe2', 'sklearn-0.0.dist-info', 'setuptools', 'pybind11-2.6.2.dist-info', 'google', 'tensorboard_plugin_wit-1.8.0.dist-info', 'fasttext-0.9.1.dist-info', 'setuptools-56.2.0.dist-info', 'pyasn1_modules', 'Cython-0.29.23.dist-info', '__pycache__', 'requests_oauthlib-1.3.0.dist-info', 'future-0.18.2.dist-info', 'python_dateutil-2.8.1.dist-info', 'tensorboard_plugin_wit', 'torchmetrics', 'ftfy-5.8.dist-info', 'scipy-1.5.4.dist-info', 'idna_ssl.py', 'dataclasses-0.8.dist-info', 'zipp-3.4.1.dist-info', 'attr', 'sentencepiece-0.1.95.dist-info', 'idna', 'distutils-precedence.pth', 'six-1.16.0.dist-info', 'cachetools', 'click', 'dateutil', 'torchvision', 'tensorboard', 'scikit_learn.libs', 'pycocotools-2.0.2.dist-info', 'multiprocess-0.70.11.1.dist-info', 'iopath', 'requests_oauthlib', 'datasets', 'requirements.txt', 'torchtext', 'async_timeout', 'importlib_metadata', 'pytz-2021.1.dist-info', 'dill-0.3.3.dist-info', 'tokenizers', 'pandas-1.1.5.dist-info', 'numpy', 'joblib-1.0.1.dist-info', 'yarl', 'dataclasses.py', 'charades_action_lables.csv', 'pl_examples', 'matplotlib', 'fasttext_pybind.cpython-36m-x86_64-linux-gnu.so', 'deprecate', 'xxhash', 'google_auth_oauthlib-0.4.4.dist-info', 'past', 'tqdm', 'sacremoses', 'absl_py-0.12.0.dist-info', 'aiohttp', 'pycocotools', 'gitdb', 'lmdb-0.98.dist-info', 'dill', 'joblib', 'multidict-5.1.0.dist-info', 'editdistance', 'lmdb', 'scipy', 'pytorch_lightning-1.4.0.dev0.dist-info', 'idna_ssl-1.1.0.dist-info', 'urllib3', 'PyYAML-5.4.1.dist-info', 'numpy.libs', 'wcwidth-0.2.5.dist-info', 'mmf', 'handler.py', 'xxhash-2.0.2.dist-info', 'mmf_transformer_Charades_final.pth', 'regex', 'filelock.py', 'pyarrow', 'threadpoolctl-2.1.0.dist-info', 'async_timeout-3.0.1.dist-info', 'smmap-4.0.0.dist-info', 'pyasn1_modules-0.2.8.dist-info', 'threadpoolctl.py', 'pytz', 'nltk', 'transformers-3.4.0.dist-info', 'git', 'certifi-2020.12.5.dist-info', 'werkzeug', 'aiohttp-3.7.4.post0.dist-info', 'editdistance-0.5.3.dist-info', 'torchtext-0.5.0.dist-info', 'matplotlib-3.3.4.dist-info', 'yaml', 'pkg_resources', 'tests', 'pyparsing-2.4.7.dist-info', 'tensorboard-2.4.1.dist-info', 'mmf_cli', 'libpasteurize', 'urllib3-1.25.11.dist-info', 'termcolor-1.1.0.dist-info', 'Cython', 'requests-2.23.0.dist-info', 'av-8.0.3.dist-info', 'zipp.py', 'sklearn', 'matplotlib-3.3.4-py3.6-nspkg.pth', 'omegaconf', 'libfuturize', 'oauthlib-3.1.0.dist-info', 'Pillow.libs', 'pyximport', 'torchaudio-0.8.1.dist-info', 'scikit_learn-0.24.2.dist-info', 'transformers', 'multidict']
2021-05-22 19:22:26,603 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - /home/model-server/tmp/models/829e3783aa894562b996a158816190b8/torchvision/io/video.py:160: UserWarning: The pts_unit 'pts' gives wrong results and will be removed in a follow-up version. Please use pts_unit 'sec'.
2021-05-22 19:22:26,603 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG -   + "follow-up version. Please use pts_unit 'sec'."
2021-05-22 19:22:32,754 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Listening on port: /home/model-server/tmp/.ts.sock.9000
2021-05-22 19:22:32,756 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - [PID]27139
2021-05-22 19:22:32,758 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Torch worker started.
2021-05-22 19:22:32,759 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Python runtime: 3.6.9
2021-05-22 19:22:32,766 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - Connection accepted: /home/model-server/tmp/.ts.sock.9000.
2021-05-22 19:22:36,886 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - *********** config keyssss ********** dict_keys(['config_version', 'training', 'trainer', 'evaluation', 'model_config', 'dataset_config', 'datasets', 'model', 'config', 'run_type', 'optimizer', 'scheduler', 'env', 'distributed', 'checkpoint', 'multitasking', 'start_rank', 'device_id'])
2021-05-22 19:22:44,687 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG - /home/model-server/tmp/models/829e3783aa894562b996a158816190b8/torchaudio/functional/functional.py:358: UserWarning: At least one mel filterbank has all zero values. The value for `n_mels` (128) may be set too high. Or, the value for `n_freqs` (201) may be set too low.
2021-05-22 19:22:44,688 [WARN ] W-9000-MMF_activity_recognition_v2_1.0-stderr MODEL_LOG -   "At least one mel filterbank has all zero values. "
2021-05-22 19:22:45,617 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout MODEL_LOG - ********* files in temp direcotry that .mar file got extracted ********* ['mmf-1.0.0rc12.dist-info', 'fsspec', 'torchvision.libs', 'yarl-1.6.3.dist-info', 'torchmetrics-0.3.2.dist-info', 'PIL', 'pyDeprecate-0.3.0.dist-info', 'chardet', 'regex-2021.4.4.dist-info', 'rsa-4.7.2.dist-info', 'oauthlib', 'grpc', 'google_auth_oauthlib', 'idna-2.10.dist-info', 'multiprocess', 'chardet-3.0.4.dist-info', 'torch-1.8.1.dist-info', 'wcwidth', 'kiwisolver-1.3.1.dist-info', 'numpy-1.19.5.dist-info', '_multiprocess', 'av.libs', 'mpl_toolkits', 'omegaconf-2.0.6.dist-info', 'av', 'bin', 'integrations', 'pyparsing.py', 'kiwisolver.cpython-36m-x86_64-linux-gnu.so', 'protobuf-3.17.0.dist-info', 'packaging-20.9.dist-info', 'psutil-5.8.0.dist-info', 'config.yaml', 'portalocker-2.3.0.dist-info', 'cycler.py', 'pyasn1', 'pyarrow-4.0.0.dist-info', 'Markdown-3.3.4.dist-info', 'nltk-3.4.5.dist-info', 'portalocker', 'MAR-INF', '_distutils_hack', 'ftfy', 'Pillow-8.2.0.dist-info', 'cycler-0.10.0.dist-info', 'scipy.libs', 'attrs-21.2.0.dist-info', 'typing_extensions-3.10.0.0.dist-info', '_yaml', 'filelock-3.0.12.dist-info', 'torch', 'pybind11', 'sentencepiece', 'gitdb-4.0.7.dist-info', 'packaging', 'sacremoses-0.0.45.dist-info', 'fasttext', 'pytorch_lightning', 'termcolor.py', 'certifi', 'google_auth-1.30.0.dist-info', 'datasets-1.2.1.dist-info', 'Werkzeug-2.0.1.dist-info', 'wheel', 'cachetools-4.2.2.dist-info', 'pylab.py', 'protobuf-3.17.0-py3.6-nspkg.pth', 'six.py', 'grpcio-1.38.0.dist-info', 'fsspec-2021.5.0.dist-info', 'click-8.0.1.dist-info', 'typing_extensions.py', 'tokenizers-0.9.2.dist-info', 'google_auth-1.30.0-py3.9-nspkg.pth', 'wheel-0.36.2.dist-info', 'future', 'requests', 'iopath-0.1.7.dist-info', 'torchvision-0.9.1.dist-info', 'absl', 'importlib_metadata-4.0.1.dist-info', 'psutil', 'cython.py', 'torchaudio', 'markdown', 'GitPython-3.1.0.dist-info', 'tqdm-4.49.0.dist-info', 'demjson.py', 'pandas', 'smmap', 'rsa', 'demjson-2.2.4.dist-info', 'pyasn1-0.4.8.dist-info', 'caffe2', 'sklearn-0.0.dist-info', 'setuptools', 'pybind11-2.6.2.dist-info', 'google', 'tensorboard_plugin_wit-1.8.0.dist-info', 'fasttext-0.9.1.dist-info', 'setuptools-56.2.0.dist-info', 'pyasn1_modules', 'Cython-0.29.23.dist-info', '__pycache__', 'requests_oauthlib-1.3.0.dist-info', 'future-0.18.2.dist-info', 'python_dateutil-2.8.1.dist-info', 'tensorboard_plugin_wit', 'torchmetrics', 'ftfy-5.8.dist-info', 'scipy-1.5.4.dist-info', 'idna_ssl.py', 'dataclasses-0.8.dist-info', 'zipp-3.4.1.dist-info', 'attr', 'sentencepiece-0.1.95.dist-info', 'idna', 'distutils-precedence.pth', 'six-1.16.0.dist-info', 'cachetools', 'click', 'dateutil', 'torchvision', 'tensorboard', 'scikit_learn.libs', 'pycocotools-2.0.2.dist-info', 'multiprocess-0.70.11.1.dist-info', 'iopath', 'requests_oauthlib', 'datasets', 'requirements.txt', 'torchtext', 'async_timeout', 'importlib_metadata', 'pytz-2021.1.dist-info', 'dill-0.3.3.dist-info', 'tokenizers', 'pandas-1.1.5.dist-info', 'numpy', 'joblib-1.0.1.dist-info', 'yarl', 'dataclasses.py', 'charades_action_lables.csv', 'pl_examples', 'matplotlib', 'fasttext_pybind.cpython-36m-x86_64-linux-gnu.so', 'deprecate', 'xxhash', 'google_auth_oauthlib-0.4.4.dist-info', 'past', 'tqdm', 'sacremoses', 'absl_py-0.12.0.dist-info', 'aiohttp', 'pycocotools', 'gitdb', 'lmdb-0.98.dist-info', 'dill', 'joblib', 'multidict-5.1.0.dist-info', 'editdistance', 'lmdb', 'scipy', 'pytorch_lightning-1.4.0.dev0.dist-info', 'idna_ssl-1.1.0.dist-info', 'urllib3', 'PyYAML-5.4.1.dist-info', 'numpy.libs', 'wcwidth-0.2.5.dist-info', 'mmf', 'handler.py', 'xxhash-2.0.2.dist-info', 'mmf_transformer_Charades_final.pth', 'regex', 'filelock.py', 'pyarrow', 'threadpoolctl-2.1.0.dist-info', 'async_timeout-3.0.1.dist-info', 'smmap-4.0.0.dist-info', 'pyasn1_modules-0.2.8.dist-info', 'threadpoolctl.py', 'pytz', 'nltk', 'transformers-3.4.0.dist-info', 'git', 'certifi-2020.12.5.dist-info', 'werkzeug', 'aiohttp-3.7.4.post0.dist-info', 'editdistance-0.5.3.dist-info', 'torchtext-0.5.0.dist-info', 'matplotlib-3.3.4.dist-info', 'yaml', 'pkg_resources', 'tests', 'pyparsing-2.4.7.dist-info', 'tensorboard-2.4.1.dist-info', 'mmf_cli', 'libpasteurize', 'urllib3-1.25.11.dist-info', 'termcolor-1.1.0.dist-info', 'Cython', 'requests-2.23.0.dist-info', 'av-8.0.3.dist-info', 'zipp.py', 'sklearn', 'matplotlib-3.3.4-py3.6-nspkg.pth', 'omegaconf', 'libfuturize', 'oauthlib-3.1.0.dist-info', 'Pillow.libs', 'pyximport', 'torchaudio-0.8.1.dist-info', 'scikit_learn-0.24.2.dist-info', 'transformers', 'multidict']

ts_log.log

Torchserve version: 0.4.0
TS Home: /usr/local/lib/python3.6/dist-packages
Current directory: /home/model-server/serve/test/pytest
Temp directory: /home/model-server/tmp
Number of GPUs: 0
Number of CPUs: 4
Max heap size: 1362 M
Python executable: /usr/bin/python3
Config file: /home/model-server/serve/test/pytest/../../test/config_ts.properties
Inference address: http://127.0.0.1:8080
Management address: http://127.0.0.1:8081
Metrics address: http://127.0.0.1:8082
Model Store: /home/model-server/tmp/workspace/model_store
Initial Models: N/A
Log dir: /home/model-server/serve/test/pytest/logs
Metrics dir: /home/model-server/serve/test/pytest/logs
Netty threads: 0
Netty client threads: 0
Default workers per model: 4
Blacklist Regex: N/A
Maximum Response Size: 6553500
Maximum Request Size: 6553500
Prefer direct buffer: false
Allowed Urls: [file://.*|http(s)?://.*]
Custom python dependency for model allowed: true
Metrics report format: prometheus
Enable metrics API: true
Workflow Store: /home/model-server/tmp/workspace/model_store
2021-05-22 19:18:56,715 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager -  Loading snapshot serializer plugin...
2021-05-22 19:18:56,785 [INFO ] main org.pytorch.serve.ModelServer - Initialize Inference server with: EpollServerSocketChannel.
2021-05-22 19:18:56,915 [INFO ] main org.pytorch.serve.ModelServer - Inference API bind to: http://127.0.0.1:8080
2021-05-22 19:18:56,915 [INFO ] main org.pytorch.serve.ModelServer - Initialize Management server with: EpollServerSocketChannel.
2021-05-22 19:18:56,918 [INFO ] main org.pytorch.serve.ModelServer - Management API bind to: http://127.0.0.1:8081
2021-05-22 19:18:56,921 [INFO ] main org.pytorch.serve.ModelServer - Initialize Metrics server with: EpollServerSocketChannel.
2021-05-22 19:18:56,923 [INFO ] main org.pytorch.serve.ModelServer - Metrics API bind to: http://127.0.0.1:8082
2021-05-22 19:20:08,605 [DEBUG] epollEventLoopGroup-3-1 org.pytorch.serve.wlm.ModelVersionedRefs - Adding new version 1.0 for model MMF_activity_recognition_v2
2021-05-22 19:20:08,608 [DEBUG] epollEventLoopGroup-3-1 org.pytorch.serve.wlm.ModelVersionedRefs - Setting default version to 1.0 for model MMF_activity_recognition_v2
2021-05-22 19:20:08,608 [INFO ] epollEventLoopGroup-3-1 org.pytorch.serve.wlm.ModelManager - Model MMF_activity_recognition_v2 loaded.
2021-05-22 19:21:36,249 [DEBUG] epollEventLoopGroup-3-1 org.pytorch.serve.wlm.ModelManager - updateModel: MMF_activity_recognition_v2, count: 1
2021-05-22 19:21:37,108 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-MMF_activity_recognition_v2_1.0 State change null -> WORKER_STARTED
2021-05-22 19:21:37,118 [INFO ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Connecting to: /home/model-server/tmp/.ts.sock.9000
2021-05-22 19:21:49,553 [INFO ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Backend response time: 12388
2021-05-22 19:21:49,554 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-MMF_activity_recognition_v2_1.0 State change WORKER_STARTED -> WORKER_MODEL_LOADED
2021-05-22 19:22:29,695 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stderr org.pytorch.serve.wlm.WorkerLifeCycle - Stopped Scanner - W-9000-MMF_activity_recognition_v2_1.0-stderr
2021-05-22 19:22:29,702 [INFO ] epollEventLoopGroup-5-1 org.pytorch.serve.wlm.WorkerThread - 9000 Worker disconnected. WORKER_MODEL_LOADED
2021-05-22 19:22:29,695 [INFO ] W-9000-MMF_activity_recognition_v2_1.0-stdout org.pytorch.serve.wlm.WorkerLifeCycle - Stopped Scanner - W-9000-MMF_activity_recognition_v2_1.0-stdout
2021-05-22 19:22:29,711 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - System state is : WORKER_MODEL_LOADED
2021-05-22 19:22:29,731 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Backend worker monitoring thread interrupted or backend worker process died.
java.lang.InterruptedException
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2056)
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2133)
	at java.base/java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:432)
	at org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:188)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
2021-05-22 19:22:29,765 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.job.Job - Waiting time ns: 248700, Inference time ns: 3174627700
2021-05-22 19:22:29,766 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-MMF_activity_recognition_v2_1.0 State change WORKER_MODEL_LOADED -> WORKER_STOPPED
2021-05-22 19:22:29,773 [WARN ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - terminateIOStreams() threadName=W-9000-MMF_activity_recognition_v2_1.0-stderr
2021-05-22 19:22:29,773 [WARN ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerLifeCycle - terminateIOStreams() threadName=W-9000-MMF_activity_recognition_v2_1.0-stdout
2021-05-22 19:22:29,781 [INFO ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Retry worker: 9000 in 1 seconds.
2021-05-22 19:22:32,757 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-MMF_activity_recognition_v2_1.0 State change WORKER_STOPPED -> WORKER_STARTED
2021-05-22 19:22:32,757 [INFO ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Connecting to: /home/model-server/tmp/.ts.sock.9000
2021-05-22 19:22:45,628 [INFO ] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - Backend response time: 12596
2021-05-22 19:22:45,628 [DEBUG] W-9000-MMF_activity_recognition_v2_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-MMF_activity_recognition_v2_1.0 State change WORKER_STARTED -> WORKER_MODEL_LOADED

access_log.log

2021-05-22 19:21:49,567 - /127.0.0.1:59330 "POST /models?model_name=MMF_activity_recognition_v2&url=https%3A%2F%2Ftorchserve.pytorch.org%2Fmar_files%2FMMF_activity_recognition_v2.mar&initial_workers=1&synchronous=true HTTP/1.1" 200 163333
2021-05-22 19:22:29,760 - /127.0.0.1:55300 "POST /v1/models/MMF_activity_recognition_v2:predict HTTP/1.1" 507 3240

@rishabh1212
Copy link
Author

rishabh1212 commented May 22, 2021

@msaroufim

Also, just double checking was the issue around UTF-8 encoded languages only present in Docker? Would be good to have support regardless of environment

I guess this problem happens generally in docker because locale sometimes not set and this python version tries to use default encoding in docker and thus we get unexpected results

@msaroufim
Copy link
Member

Interesting on the MMF error - are you starting Docker locally or from an Ubuntu machine? Might it be a 20.04 machine?

One last thing do you mind sharing an inference in English vs UTF-8 language just so we can eyeball that everything seems to work?

@rishabh1212
Copy link
Author

Interesting on the MMF error - are you starting Docker locally or from an Ubuntu machine? Might it be a 20.04 machine?

@msaroufim I am running docker on MAC and I am starting docker locally

Inside docker on this branch english inference working fine

git clone https://github.com/pytorch/serve.git
mkdir model_store
wget https://download.pytorch.org/models/densenet161-8d451a50.pth
torch-model-archiver --model-name densenet161 --version 1.0 --model-file ./serve/examples/image_classifier/densenet_161/model.py --serialized-file densenet161-8d451a50.pth --export-path model_store --extra-files ./serve/examples/image_classifier/index_to_name.json --handler image_classifier
torchserve --start --ncs --model-store model_store --models densenet161.mar
curl -O https://s3.amazonaws.com/model-server/inputs/kitten.jpg
curl http://127.0.0.1:8080/predictions/densenet161 -T kitten.jpg
{
  "tiger_cat": 0.4693357050418854,
  "tabby": 0.4633876085281372,
  "Egyptian_cat": 0.06456158310174942,
  "lynx": 0.001282821991480887,
  "plastic_bag": 0.00023323067580349743
}

For Japanese inference

torchserve --stop
mkdir -p model_store
rm -rf model_store/*
rm -rf logs
torch-model-archiver --model-name servemodel --version 1.0  --handler model_handler.py --export-path model_store --extra-files vec.txt
torchserve --start --ncs --ts-config config.properties --model-store model_store --models servemodel.mar

Inside docker on master branch getting ascii decode error for Japanese inference

Below contains the test and logs...look at model_log.log file to verify
test-fail-on-master.zip

Inside docker on present branch running perfectly fine for Japanese inference

test-pass-on-present-branch.zip

curl -X POST -H 'Content-Type: application/json' -d '{"hoge": "this is an example. これは例です。"}' http://127.0.0.1:8080/predictions/servemodel/1.0/
{
  "hoge": "this is an example. \u3053\u308c\u306f\u4f8b\u3067\u3059\u3002",
  "\u3042\u3044\u3046\u3048\u304a": "\u304b\u304d\u304f\u3051\u3053"
}

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-win
  • Commit ID: e72f365
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-neo-ci-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: torch-serve-build-gpu
  • Commit ID: e72f365
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@msaroufim
Copy link
Member

Seems like the right way to solve this is a bit more involved - can you check this out and let me know what you think is the best way to proceed? https://stackoverflow.com/questions/28405902/how-to-set-the-locale-inside-a-debian-ubuntu-docker-container

@lxning lxning requested review from msaroufim and nikhil-sk August 30, 2021 18:59
@chauhang chauhang changed the title FIX for Ascii decode error when reading file using python inside docker [WIP] FIX for Ascii decode error when reading file using python inside docker Sep 9, 2021
@rishabh1212 rishabh1212 closed this Oct 8, 2021
@rishabh1212 rishabh1212 deleted the fix_821_ascii_decode_error branch October 8, 2021 12:37
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.

[BUG] Dockerfile with nvidia/cuda:10.2-cudnn7-runtime-ubuntu18.04 gives ascii codec error
3 participants