Skip to content

Endpoint creation completes before custom model_fn finishes loading resources #111

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

Open
Tripping-Hazard opened this issue Feb 12, 2024 · 0 comments

Comments

@Tripping-Hazard
Copy link

Image used: 763104351884.dkr.ecr.us-east-1.amazonaws.com/huggingface-pytorch-inference:2.1.0-transformers4.37.0-gpu-py310-cu118-ubuntu20.04 with custom inference.py.

I am loading some essential data from S3 for post processing on model's output and I included the data loading in the custom model_fn function. The data takes around 3~5 minutes to load. One thing I noticed is that the endpoint creation or update will complete before model_fn returns so the endpoint becomes available for incoming calls before all the data and model is loaded. This resulted in several minutes of additional latency around the period of time when endpoint is created or updated. How can I prevent this from happening?

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

No branches or pull requests

1 participant