We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
mlserver --version fails (0.5.0)
```
mlserver --version
Traceback (most recent call last):
  File "/home/clive/anaconda3/envs/mlserver/bin/mlserver", line 8, in <module>
    sys.exit(main())
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/mlserver/cli/main.py", line 45, in main
    root()
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 781, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 1212, in parse_args
    rest = Command.parse_args(self, ctx, args)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 1630, in handle_parse_result
    value = invoke_param_callback(self.callback, ctx, self, value)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py", line 123, in invoke_param_callback
    return callback(ctx, param, value)
  File "/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/decorators.py", line 295, in callback
    raise RuntimeError("Could not determine version")
RuntimeError: Could not determine version
(mlserver) /home/clive $ pip freeze | grep mlserver
mlserver==0.5.0
```

--- 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 setup(
29     name=PKG_NAME,
30     version=_load_version(),
31     url="https://github.com/SeldonIO/MLServer.git",
32     author="Seldon Technologies Ltd.",
33     author_email="hello@seldon.io",
34     description="ML server",
35     packages=find_packages(exclude=["tests", "tests.*"]),
36     install_requires=[
37         "grpcio",
38         "protobuf",
39         # We pin version of fastapi
40         # check https://github.com/SeldonIO/MLServer/issues/340
41         "fastapi==0.68.2",
42         "uvicorn",
43         "click",
44         "numpy",
45         "pandas",
46     ],
47     extras_require={"all": ["orjson"]},
48     entry_points={"console_scripts": ["mlserver=mlserver.cli:main"]},
49     long_description=_load_description(),
50     long_description_content_type="text/markdown",
51     license="Apache 2.0",
52 )
53
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -34,15 +34,16 @@
     description="ML server",
     packages=find_packages(exclude=["tests", "tests.*"]),
     install_requires=[
-        "grpcio",
-        "protobuf",
+        "click",
         # We pin version of fastapi
         # check https://github.com/SeldonIO/MLServer/issues/340
         "fastapi==0.68.2",
-        "uvicorn",
-        "click",
+        "grpcio",
+        "importlib-metadata;python_version<'3.8'",
         "numpy",
         "pandas",
+        "protobuf",
+        "uvicorn",
     ],
     extras_require={"all": ["orjson"]},
     entry_points={"console_scripts": ["mlserver=mlserver.cli:main"]},

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -34,15 +34,16 @@\n     description=\"ML server\",\n     packages=find_packages(exclude=[\"tests\", \"tests.*\"]),\n     install_requires=[\n-        \"grpcio\",\n-        \"protobuf\",\n+        \"click\",\n         # We pin version of fastapi\n         # check https://github.com/SeldonIO/MLServer/issues/340\n         \"fastapi==0.68.2\",\n-        \"uvicorn\",\n-        \"click\",\n+        \"grpcio\",\n+        \"importlib-metadata;python_version<'3.8'\",\n         \"numpy\",\n         \"pandas\",\n+        \"protobuf\",\n+        \"uvicorn\",\n     ],\n     extras_require={\"all\": [\"orjson\"]},\n     entry_points={\"console_scripts\": [\"mlserver=mlserver.cli:main\"]},\n", "issue": "mlserver --version fails (0.5.0)\n```\r\nmlserver --version\r\nTraceback (most recent call last):\r\n  File \"/home/clive/anaconda3/envs/mlserver/bin/mlserver\", line 8, in <module>\r\n    sys.exit(main())\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/mlserver/cli/main.py\", line 45, in main\r\n    root()\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 829, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 781, in main\r\n    with self.make_context(prog_name, args, **extra) as ctx:\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 700, in make_context\r\n    self.parse_args(ctx, args)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 1212, in parse_args\r\n    rest = Command.parse_args(self, ctx, args)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 1048, in parse_args\r\n    value, args = param.handle_parse_result(ctx, opts, args)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 1630, in handle_parse_result\r\n    value = invoke_param_callback(self.callback, ctx, self, value)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/core.py\", line 123, in invoke_param_callback\r\n    return callback(ctx, param, value)\r\n  File \"/home/clive/anaconda3/envs/mlserver/lib/python3.8/site-packages/click/decorators.py\", line 295, in callback\r\n    raise RuntimeError(\"Could not determine version\")\r\nRuntimeError: Could not determine version\r\n(mlserver) /home/clive $ pip freeze | grep mlserver\r\nmlserver==0.5.0\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\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        \"grpcio\",\n        \"protobuf\",\n        # We pin version of fastapi\n        # check https://github.com/SeldonIO/MLServer/issues/340\n        \"fastapi==0.68.2\",\n        \"uvicorn\",\n        \"click\",\n        \"numpy\",\n        \"pandas\",\n    ],\n    extras_require={\"all\": [\"orjson\"]},\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\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        # We pin version of fastapi\n        # check https://github.com/SeldonIO/MLServer/issues/340\n        \"fastapi==0.68.2\",\n        \"grpcio\",\n        \"importlib-metadata;python_version<'3.8'\",\n        \"numpy\",\n        \"pandas\",\n        \"protobuf\",\n        \"uvicorn\",\n    ],\n    extras_require={\"all\": [\"orjson\"]},\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"}]}