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

Worker PID is not available yet #2368

Open
viratbiz opened this issue May 29, 2023 · 4 comments
Open

Worker PID is not available yet #2368

viratbiz opened this issue May 29, 2023 · 4 comments
Assignees
Labels
bug Something isn't working large-model triaged Issue has been reviewed and triaged

Comments

@viratbiz
Copy link

🐛 Describe the bug

I am using python version 3.9. There is error coming that "Worker pid is not available yet." This is due to the model_service_worker.py in ts. The error is name: "Integer" is not defined. I have also attached the image for reference.

Screenshot 2023-05-29 at 1 42 22 PM

Error logs

2023-05-29T13:36:37,550 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - Backend worker process died.
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - Traceback (most recent call last):
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - File "/Users/virat.s/miniconda3/envs/python_39/lib/python3.9/site-packages/ts/model_service_worker.py", line 250, in
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - worker = TorchModelServiceWorker(
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - File "/Users/virat.s/miniconda3/envs/python_39/lib/python3.9/site-packages/ts/model_service_worker.py", line 69, in init
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - self.port = Integer.pa + LOCAL_RANK
2023-05-29T13:36:37,551 [INFO ] W-9001-midjourney_1.0-stdout MODEL_LOG - NameError: name 'Integer' is not defined
2023-05-29T13:36:37,554 [INFO ] W-9005-midjourney_1.0-stdout MODEL_LOG - Backend worker process died.

Installation instructions

pip install torch-model-archiver torchserve

Model Packaing

Standard sytable_diffusion_handler.py

config.properties

No response

Versions

Python version 3.9

Repro instructions

torch-model-archiver --model-name midjourney --version 1.0 --handler midjourney_handler.py --extra-files model.zip -r requirements.txt

requirements.txt:
transformers
diffusers==0.16.1
numpy

torchserve --start --ts-config config.properties

Possible Solution

No response

@msaroufim msaroufim added bug Something isn't working triaged Issue has been reviewed and triaged large-model labels May 29, 2023
@msaroufim
Copy link
Member

Seems related to #2349

@lxning
Copy link
Collaborator

lxning commented May 31, 2023

@viratbiz could you provide your config.properties?

BTW, the handler implementation has to avoid multiple process unzip the same zip file concurrently if you pass zip file (ie." --extra-files model.zip ). In fact, you don't need pass zip file. you can just pass "--extra-file model_dir --archive-format tgz", then archiver will generate tgz file for you.

@viratbiz
Copy link
Author

viratbiz commented Jun 1, 2023

Using the default config properties given here: https://github.com/pytorch/serve/blob/master/examples/diffusers/config.properties

@lxning
Copy link
Collaborator

lxning commented Jun 1, 2023

@viratbiz according to the above error log, tcp is used. However, the config.properties uses the socket. there is a log starting with "Worker cmdline:" in logs/ts_log.log. could you provide it so that i can know which protocol is used? Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working large-model triaged Issue has been reviewed and triaged
Projects
None yet
Development

No branches or pull requests

4 participants