-
Notifications
You must be signed in to change notification settings - Fork 87
Validate config.yaml fields depending on transport kind, fix model wrapper test #1788
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
base: main
Are you sure you want to change the base?
Validate config.yaml fields depending on transport kind, fix model wrapper test #1788
Conversation
truss/base/truss_config.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to do getattr
here? we've already checked that docker_server is not None, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes docker_server
is not None, but I think we need getattr
to be able to check arbitrary fields in a loop like this (docker_server.server_port
, etc.)
2cb1ca5
to
8228ec8
Compare
apply_library_patches: bool = True | ||
spec_version: str = "2.0" | ||
|
||
DOCKER_SERVER_OPTIONAL_FIELDS: ClassVar[list[str]] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are only optional in the case of grpc right? can we rename this to be clearer
}, | ||
"Please define server_port, predict_endpoint, readiness_endpoint, and liveness_endpoint for docker_server", | ||
id="invalid-http-missing-fields", | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to add a case for websockets
🚀 What
docker_server
section has the expected fields depending on whether or not the deployment is gRPCtest_model_wrapper.py::test_trt_llm_truss_missing_model_py
which was failing in CI🔬 Testing
docker_server
is not present or has unexpected fields for gRPC deployments