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

[Serve] Rename input_schema to http_adapter and clarify it in doc #24353

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

simon-mo
Copy link
Contributor

@simon-mo simon-mo commented Apr 29, 2022

Why are these changes needed?

This PR should be a simple rename. But I also went into to clarify the HTTP adapter documentation further.

Related issue number

Closes #24192

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@simon-mo simon-mo changed the title [Serve] Rename input_schema to http_adapter [Serve] Rename input_schema to http_adapter and clarify it in doc Apr 29, 2022
@simon-mo simon-mo marked this pull request as ready for review April 29, 2022 21:23
Copy link
Member

@jiaodong jiaodong left a comment

Choose a reason for hiding this comment

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

looks good to me, just some nits. Will leave it to you to decide when to merge.

Btw are you trying to include this in 1.13 branch cut ?

@@ -142,7 +142,7 @@ def test_yaml_compatibility(serve_instance):
"checkpoint_cls": checkpoint_cls,
"uri": path,
},
"input_schema": schema_func,
"http_adapter": schema_func,
Copy link
Member

Choose a reason for hiding this comment

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

schema_func -> adapter_func for this and line 130 ?

.. code-block:: python

def parse_query_args(field_a: int, field_b: str):
return YourDataClass(field_a, field_b)
Copy link
Member

Choose a reason for hiding this comment

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

can we put up a full, short snippet here to show user what the http request look like and how its resolved by http_adapter function into YourDataClass ?

@simon-mo
Copy link
Contributor Author

simon-mo commented Apr 29, 2022

Btw are you trying to include this in 1.13 branch cut ?

yes

@simon-mo simon-mo merged commit 3378e19 into ray-project:master Apr 29, 2022
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.

[Serve] Rename input_schema to http_adapter
2 participants