-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[serve] Replace ClassNode
and FunctionNode
with Application
in top-level Serve APIs
#34627
Conversation
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
ClassNode
and FunctionNode
with Application
in top-level Serve APIs
# If the ingress deployment is a function and it is bound to other deployments, | ||
# reject. | ||
if isinstance(serve_root_dag, DeploymentFunctionNode) and len(deployments) != 1: | ||
raise ValueError( |
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.
This is just pushed down into the DAG code instead of in the top-level API
@@ -23,7 +23,7 @@ def __setitem__(self, *args): | |||
|
|||
|
|||
@DeveloperAPI | |||
class Application: | |||
class BuiltApplication: |
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.
FYI, I think you need to manually insert these classes into Sphinx now or else they won't get rendered.
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.
going to clean up API ref & add this in a separate PR
ping @sihanwang41 |
…top-level Serve APIs (ray-project#34627) A bit of renaming to streamline the concepts in the API: - Instead of bind() returning ClassNode or FunctionNode (which are very in the weeds), it returns an Application object. - This required renaming the output of serve.build, which I've renamed to BuiltApplication (checks out conceptually - serve.build(app) -> built_app. - From now on, we should never make mention of "nodes" or "graphs" in user-facing docs/docstrings except for where we are explicitly talking about the call graph API (with InputNode: ...). I will update the docs accordingly. - We should also type annotate our documentation examples where possible to make the concepts very clear. Signed-off-by: Jack He <[email protected]>
…top-level Serve APIs (ray-project#34627) A bit of renaming to streamline the concepts in the API: - Instead of bind() returning ClassNode or FunctionNode (which are very in the weeds), it returns an Application object. - This required renaming the output of serve.build, which I've renamed to BuiltApplication (checks out conceptually - serve.build(app) -> built_app. - From now on, we should never make mention of "nodes" or "graphs" in user-facing docs/docstrings except for where we are explicitly talking about the call graph API (with InputNode: ...). I will update the docs accordingly. - We should also type annotate our documentation examples where possible to make the concepts very clear.
Why are these changes needed?
A bit of renaming to streamline the concepts in the API:
bind()
returningClassNode
orFunctionNode
(which are very in the weeds), it returns anApplication
object.serve.build
, which I've renamed toBuiltApplication
(checks out conceptually -serve.build(app) -> built_app
.with InputNode: ...
). I will update the docs accordingly.Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.