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

Added Inference Spec & CI #20

Merged
merged 8 commits into from
Dec 11, 2024
Merged

Added Inference Spec & CI #20

merged 8 commits into from
Dec 11, 2024

Conversation

AlejandroEsquivel
Copy link
Contributor

@AlejandroEsquivel AlejandroEsquivel commented Sep 17, 2024

Added:

  • Added Inference Spec class to support Ray, Sagemaker, FastAPI in one go
  • Added CI to support to deploy/update validator's inference endpoint on the cluster

Example Running FastAPI with Inference Spec:

pip install git+https://github.com/guardrails-ai/models-host@feat/adding-ray-setup
uvicorn models_host.fastapi:app

Example Running Ray Serve with Inference Spec:

# Refer to models-host repo for instructions if you don't have a GPU on the machine running ray serve
pip install git+https://github.com/guardrails-ai/models-host@feat/adding-ray-setup
serve run models_host.ray_serve:app

@AlejandroEsquivel AlejandroEsquivel marked this pull request as ready for review September 17, 2024 20:55
Copy link
Contributor

@JosephCatrambone JosephCatrambone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double checking that serve should not have the .py extension and that app.py is still required? Can we remove app.py now that inference_spec is in place or is that required for the heartbeat path?

@AlejandroEsquivel
Copy link
Contributor Author

Double checking that serve should not have the .py extension and that app.py is still required? Can we remove app.py now that inference_spec is in place or is that required for the heartbeat path?

yep good call outs, serve is a standarized filename for Sagemaker to load models for inference and has no extension but has the top part #!/usr/bin/env python

as for app.py not technically needed but I believe it's purpose was to showcase to other "validator developers" how they can serve the validator themselves but would be good to double check with Z cause once their impl starts diverging we might not want to maintain those unless there's a better reason to keep them around

@AlejandroEsquivel AlejandroEsquivel merged commit a348e1f into main Dec 11, 2024
1 check passed
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.

2 participants