prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  MLServer is incompatible with latest release of FastAPI
  MLServer is incompatible with [latest release of FastAPI](https://github.com/tiangolo/fastapi/releases/tag/0.89.0), and installing any version of MLServer will result in the following error, temp workaround added in this [pull request](https://github.com/SeldonIO/MLServer/pull/934) however, I think this needs a more in-depth root-cause analysis.
  ```
  2023-01-09 02:11:59,296 [mlserver] INFO - Using asyncio event-loop policy: uvloop
  2023-01-09 02:11:59,301 [mlserver] WARNING - Model name 'node-1' is different than model's folder name '25-mlserver-example-single'.
  Traceback (most recent call last):
    File "/home/cc/miniconda3/envs/central-1/bin/mlserver", line 8, in <module>
      sys.exit(main())
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py", line 79, in main
      root()
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
      return self.main(*args, **kwargs)
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py", line 1055, in main
      rv = self.invoke(ctx)
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py", line 760, in invoke
      return __callback(*args, **kwargs)
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py", line 20, in wrapper
      return asyncio.run(f(*args, **kwargs))
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/asyncio/runners.py", line 44, in run
      return loop.run_until_complete(main)
    File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py", line 43, in start
      server = MLServer(settings)
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/server.py", line 71, in __init__
      self._rest_server = RESTServer(
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/rest/server.py", line 26, in __init__
      self._app = create_app(
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/rest/app.py", line 43, in create_app
      APIRoute(
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/fastapi/routing.py", line 400, in __init__
      self.response_field = create_response_field(
    File "/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/fastapi/utils.py", line 90, in create_response_field
      raise fastapi.exceptions.FastAPIError(
  fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'starlette.responses.Response'> is a valid pydantic field type
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 import os
  2 
  3 from typing import Dict
  4 from setuptools import setup, find_packages
  5 
  6 ROOT_PATH = os.path.dirname(__file__)
  7 PKG_NAME = "mlserver"
  8 PKG_PATH = os.path.join(ROOT_PATH, PKG_NAME)
  9 
  10 
  11 def _load_version() -> str:
  12     version = ""
  13     version_path = os.path.join(PKG_PATH, "version.py")
  14     with open(version_path) as fp:
  15         version_module: Dict[str, str] = {}
  16         exec(fp.read(), version_module)
  17         version = version_module["__version__"]
  18 
  19     return version
  20 
  21 
  22 def _load_description() -> str:
  23     readme_path = os.path.join(ROOT_PATH, "README.md")
  24     with open(readme_path) as fp:
  25         return fp.read()
  26 
  27 
  28 env_marker_cpython = (
  29     "sys_platform != 'win32'"
  30     " and (sys_platform != 'cygwin'"
  31     " and platform_python_implementation != 'PyPy')"
  32 )
  33 
  34 setup(
  35     name=PKG_NAME,
  36     version=_load_version(),
  37     url="https://github.com/SeldonIO/MLServer.git",
  38     author="Seldon Technologies Ltd.",
  39     author_email="hello@seldon.io",
  40     description="ML server",
  41     packages=find_packages(exclude=["tests", "tests.*"]),
  42     install_requires=[
  43         "click",
  44         "fastapi<=0.88.0",
  45         "python-dotenv",
  46         "grpcio",
  47         "importlib-metadata;python_version<'3.8'",
  48         "numpy",
  49         "pandas",
  50         "protobuf",
  51         "uvicorn",
  52         "starlette_exporter",
  53         "py-grpc-prometheus",
  54         "uvloop;" + env_marker_cpython,
  55         "aiokafka",
  56         "tritonclient[http]>=2.24",
  57         "aiofiles",
  58         "orjson",
  59     ],
  60     entry_points={"console_scripts": ["mlserver=mlserver.cli:main"]},
  61     long_description=_load_description(),
  62     long_description_content_type="text/markdown",
  63     license="Apache 2.0",
  64 )
  65
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -41,7 +41,8 @@
       packages=find_packages(exclude=["tests", "tests.*"]),
       install_requires=[
           "click",
  -        "fastapi<=0.88.0",
  +        # 0.89.0: https://github.com/tiangolo/fastapi/issues/5861
  +        "fastapi<=0.89.1, !=0.89.0",
           "python-dotenv",
           "grpcio",
           "importlib-metadata;python_version<'3.8'",
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -41,7 +41,8 @@\n     packages=find_packages(exclude=[\"tests\", \"tests.*\"]),\n     install_requires=[\n         \"click\",\n-        \"fastapi<=0.88.0\",\n+        # 0.89.0: https://github.com/tiangolo/fastapi/issues/5861\n+        \"fastapi<=0.89.1, !=0.89.0\",\n         \"python-dotenv\",\n         \"grpcio\",\n         \"importlib-metadata;python_version<'3.8'\",\n", "issue": "MLServer is incompatible with latest release of FastAPI\nMLServer is incompatible with [latest release of FastAPI](https://github.com/tiangolo/fastapi/releases/tag/0.89.0), and installing any version of MLServer will result in the following error, temp workaround added in this [pull request](https://github.com/SeldonIO/MLServer/pull/934) however, I think this needs a more in-depth root-cause analysis.\r\n```\r\n2023-01-09 02:11:59,296 [mlserver] INFO - Using asyncio event-loop policy: uvloop\r\n2023-01-09 02:11:59,301 [mlserver] WARNING - Model name 'node-1' is different than model's folder name '25-mlserver-example-single'.\r\nTraceback (most recent call last):\r\n  File \"/home/cc/miniconda3/envs/central-1/bin/mlserver\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py\", line 79, in main\r\n    root()\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py\", line 1130, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py\", line 1055, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py\", line 1657, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py\", line 1404, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/click/core.py\", line 760, in invoke\r\n    return __callback(*args, **kwargs)\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py\", line 20, in wrapper\r\n    return asyncio.run(f(*args, **kwargs))\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/asyncio/runners.py\", line 44, in run\r\n    return loop.run_until_complete(main)\r\n  File \"uvloop/loop.pyx\", line 1517, in uvloop.loop.Loop.run_until_complete\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/cli/main.py\", line 43, in start\r\n    server = MLServer(settings)\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/server.py\", line 71, in __init__\r\n    self._rest_server = RESTServer(\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/rest/server.py\", line 26, in __init__\r\n    self._app = create_app(\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/mlserver/rest/app.py\", line 43, in create_app\r\n    APIRoute(\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/fastapi/routing.py\", line 400, in __init__\r\n    self.response_field = create_response_field(\r\n  File \"/home/cc/miniconda3/envs/central-1/lib/python3.9/site-packages/fastapi/utils.py\", line 90, in create_response_field\r\n    raise fastapi.exceptions.FastAPIError(\r\nfastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'starlette.responses.Response'> is a valid pydantic field type\r\n```\n", "before_files": [{"content": "import os\n\nfrom typing import Dict\nfrom setuptools import setup, find_packages\n\nROOT_PATH = os.path.dirname(__file__)\nPKG_NAME = \"mlserver\"\nPKG_PATH = os.path.join(ROOT_PATH, PKG_NAME)\n\n\ndef _load_version() -> str:\n    version = \"\"\n    version_path = os.path.join(PKG_PATH, \"version.py\")\n    with open(version_path) as fp:\n        version_module: Dict[str, str] = {}\n        exec(fp.read(), version_module)\n        version = version_module[\"__version__\"]\n\n    return version\n\n\ndef _load_description() -> str:\n    readme_path = os.path.join(ROOT_PATH, \"README.md\")\n    with open(readme_path) as fp:\n        return fp.read()\n\n\nenv_marker_cpython = (\n    \"sys_platform != 'win32'\"\n    \" and (sys_platform != 'cygwin'\"\n    \" and platform_python_implementation != 'PyPy')\"\n)\n\nsetup(\n    name=PKG_NAME,\n    version=_load_version(),\n    url=\"https://github.com/SeldonIO/MLServer.git\",\n    author=\"Seldon Technologies Ltd.\",\n    author_email=\"hello@seldon.io\",\n    description=\"ML server\",\n    packages=find_packages(exclude=[\"tests\", \"tests.*\"]),\n    install_requires=[\n        \"click\",\n        \"fastapi<=0.88.0\",\n        \"python-dotenv\",\n        \"grpcio\",\n        \"importlib-metadata;python_version<'3.8'\",\n        \"numpy\",\n        \"pandas\",\n        \"protobuf\",\n        \"uvicorn\",\n        \"starlette_exporter\",\n        \"py-grpc-prometheus\",\n        \"uvloop;\" + env_marker_cpython,\n        \"aiokafka\",\n        \"tritonclient[http]>=2.24\",\n        \"aiofiles\",\n        \"orjson\",\n    ],\n    entry_points={\"console_scripts\": [\"mlserver=mlserver.cli:main\"]},\n    long_description=_load_description(),\n    long_description_content_type=\"text/markdown\",\n    license=\"Apache 2.0\",\n)\n", "path": "setup.py"}], "after_files": [{"content": "import os\n\nfrom typing import Dict\nfrom setuptools import setup, find_packages\n\nROOT_PATH = os.path.dirname(__file__)\nPKG_NAME = \"mlserver\"\nPKG_PATH = os.path.join(ROOT_PATH, PKG_NAME)\n\n\ndef _load_version() -> str:\n    version = \"\"\n    version_path = os.path.join(PKG_PATH, \"version.py\")\n    with open(version_path) as fp:\n        version_module: Dict[str, str] = {}\n        exec(fp.read(), version_module)\n        version = version_module[\"__version__\"]\n\n    return version\n\n\ndef _load_description() -> str:\n    readme_path = os.path.join(ROOT_PATH, \"README.md\")\n    with open(readme_path) as fp:\n        return fp.read()\n\n\nenv_marker_cpython = (\n    \"sys_platform != 'win32'\"\n    \" and (sys_platform != 'cygwin'\"\n    \" and platform_python_implementation != 'PyPy')\"\n)\n\nsetup(\n    name=PKG_NAME,\n    version=_load_version(),\n    url=\"https://github.com/SeldonIO/MLServer.git\",\n    author=\"Seldon Technologies Ltd.\",\n    author_email=\"hello@seldon.io\",\n    description=\"ML server\",\n    packages=find_packages(exclude=[\"tests\", \"tests.*\"]),\n    install_requires=[\n        \"click\",\n        # 0.89.0: https://github.com/tiangolo/fastapi/issues/5861\n        \"fastapi<=0.89.1, !=0.89.0\",\n        \"python-dotenv\",\n        \"grpcio\",\n        \"importlib-metadata;python_version<'3.8'\",\n        \"numpy\",\n        \"pandas\",\n        \"protobuf\",\n        \"uvicorn\",\n        \"starlette_exporter\",\n        \"py-grpc-prometheus\",\n        \"uvloop;\" + env_marker_cpython,\n        \"aiokafka\",\n        \"tritonclient[http]>=2.24\",\n        \"aiofiles\",\n        \"orjson\",\n    ],\n    entry_points={\"console_scripts\": [\"mlserver=mlserver.cli:main\"]},\n    long_description=_load_description(),\n    long_description_content_type=\"text/markdown\",\n    license=\"Apache 2.0\",\n)\n", "path": "setup.py"}]}