diff --git a/doc/source/serve/index.rst b/doc/source/serve/index.rst index 2a6508a98..6d4503bb7 100644 --- a/doc/source/serve/index.rst +++ b/doc/source/serve/index.rst @@ -37,7 +37,7 @@ Since Serve is built on Ray, it also allows you to scale to many machines, in yo Installation ============ -Ray Serve supports Python versions 3.5 and higher. To install Ray Serve: +Ray Serve supports Python versions 3.6 and higher. To install Ray Serve: .. code-block:: bash diff --git a/python/ray/serve/examples/doc/quickstart_class.py b/python/ray/serve/examples/doc/quickstart_class.py index 7a8c3d7ff..6c6ba2808 100644 --- a/python/ray/serve/examples/doc/quickstart_class.py +++ b/python/ray/serve/examples/doc/quickstart_class.py @@ -11,11 +11,12 @@ class Counter: self.count = 0 def __call__(self, flask_request): + self.count += 1 return {"current_counter": self.count} client.create_backend("counter", Counter) client.create_endpoint("counter", backend="counter", route="/counter") -requests.get("http://127.0.0.1:8000/counter").json() -# > {"current_counter": 0} +print(requests.get("http://127.0.0.1:8000/counter").json()) +# > {"current_counter": 1} diff --git a/python/ray/serve/examples/doc/quickstart_function.py b/python/ray/serve/examples/doc/quickstart_function.py index a0e26d3f2..9e7c9bb1f 100644 --- a/python/ray/serve/examples/doc/quickstart_function.py +++ b/python/ray/serve/examples/doc/quickstart_function.py @@ -13,5 +13,5 @@ def echo(flask_request): client.create_backend("hello", echo) client.create_endpoint("hello", backend="hello", route="/hello") -requests.get("http://127.0.0.1:8000/hello").text -# > "hello serve!" +print(requests.get("http://127.0.0.1:8000/hello").text) +# > hello serve!