prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  No matches for kind \"HorizontalPodAutoscaler\" in version \"autoscaling/v2beta2\
  /kind bug
  
  **What steps did you take and what happened:**
  Deploy kserve in raw mode on kubernetes 1.26 where autoscaling/v2beta2 is no longer available
  
  
  **What did you expect to happen:**
  Kserve should support v2 of the api
  
  
  </issue>
  <code>
  [start of hack/python-sdk/update_release_version_helper.py]
  1 #!/usr/bin/env python3
  2 
  3 # Copyright 2023 The KServe Authors.
  4 #
  5 # Licensed under the Apache License, Version 2.0 (the "License");
  6 # you may not use this file except in compliance with the License.
  7 # You may obtain a copy of the License at
  8 #
  9 #    http://www.apache.org/licenses/LICENSE-2.0
  10 #
  11 # Unless required by applicable law or agreed to in writing, software
  12 # distributed under the License is distributed on an "AS IS" BASIS,
  13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 # See the License for the specific language governing permissions and
  15 # limitations under the License.
  16 
  17 import tomlkit
  18 import argparse
  19 
  20 parser = argparse.ArgumentParser(description="Update release version in python toml files")
  21 parser.add_argument("version", type=str, help="release version")
  22 args, _ = parser.parse_known_args()
  23 
  24 toml_files = [
  25     "python/kserve/pyproject.toml",
  26     "python/aiffairness/pyproject.toml",
  27     "python/aixexplainer/pyproject.toml",
  28     "python/alibiexplainer/pyproject.toml",
  29     "python/artexplainer/pyproject.toml",
  30     "python/custom_model/pyproject.toml",
  31     "python/custom_transformer/pyproject.toml",
  32     "python/lgbserver/pyproject.toml",
  33     "python/paddleserver/pyproject.toml",
  34     "python/pmmlserver/pyproject.toml",
  35     "python/sklearnserver/pyproject.toml",
  36     "python/xgbserver/pyproject.toml",
  37 ]
  38 
  39 for toml_file in toml_files:
  40     with open(toml_file, "r") as file:
  41         toml_config = tomlkit.load(file)
  42         toml_config['tool']['poetry']['version'] = args.version
  43 
  44     with open(toml_file, "w") as file:
  45         tomlkit.dump(toml_config, file)
  46
  [end of hack/python-sdk/update_release_version_helper.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/hack/python-sdk/update_release_version_helper.py b/hack/python-sdk/update_release_version_helper.py
  --- a/hack/python-sdk/update_release_version_helper.py
  +++ b/hack/python-sdk/update_release_version_helper.py
  @@ -24,7 +24,6 @@
   toml_files = [
       "python/kserve/pyproject.toml",
       "python/aiffairness/pyproject.toml",
  -    "python/aixexplainer/pyproject.toml",
       "python/alibiexplainer/pyproject.toml",
       "python/artexplainer/pyproject.toml",
       "python/custom_model/pyproject.toml",
  
verification_info: {"golden_diff": "diff --git a/hack/python-sdk/update_release_version_helper.py b/hack/python-sdk/update_release_version_helper.py\n--- a/hack/python-sdk/update_release_version_helper.py\n+++ b/hack/python-sdk/update_release_version_helper.py\n@@ -24,7 +24,6 @@\n toml_files = [\n     \"python/kserve/pyproject.toml\",\n     \"python/aiffairness/pyproject.toml\",\n-    \"python/aixexplainer/pyproject.toml\",\n     \"python/alibiexplainer/pyproject.toml\",\n     \"python/artexplainer/pyproject.toml\",\n     \"python/custom_model/pyproject.toml\",\n", "issue": "No matches for kind \\\"HorizontalPodAutoscaler\\\" in version \\\"autoscaling/v2beta2\\\n/kind bug\r\n\r\n**What steps did you take and what happened:**\r\nDeploy kserve in raw mode on kubernetes 1.26 where autoscaling/v2beta2 is no longer available\r\n\r\n\r\n**What did you expect to happen:**\r\nKserve should support v2 of the api\r\n\n", "before_files": [{"content": "#!/usr/bin/env python3\n\n# Copyright 2023 The KServe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport tomlkit\nimport argparse\n\nparser = argparse.ArgumentParser(description=\"Update release version in python toml files\")\nparser.add_argument(\"version\", type=str, help=\"release version\")\nargs, _ = parser.parse_known_args()\n\ntoml_files = [\n    \"python/kserve/pyproject.toml\",\n    \"python/aiffairness/pyproject.toml\",\n    \"python/aixexplainer/pyproject.toml\",\n    \"python/alibiexplainer/pyproject.toml\",\n    \"python/artexplainer/pyproject.toml\",\n    \"python/custom_model/pyproject.toml\",\n    \"python/custom_transformer/pyproject.toml\",\n    \"python/lgbserver/pyproject.toml\",\n    \"python/paddleserver/pyproject.toml\",\n    \"python/pmmlserver/pyproject.toml\",\n    \"python/sklearnserver/pyproject.toml\",\n    \"python/xgbserver/pyproject.toml\",\n]\n\nfor toml_file in toml_files:\n    with open(toml_file, \"r\") as file:\n        toml_config = tomlkit.load(file)\n        toml_config['tool']['poetry']['version'] = args.version\n\n    with open(toml_file, \"w\") as file:\n        tomlkit.dump(toml_config, file)\n", "path": "hack/python-sdk/update_release_version_helper.py"}]}