prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Improve our continuous testing for model presets
  Opening an issue to track the changes proposed on https://github.com/keras-team/keras-nlp/pull/357, as it has gotten slightly larger in scope.
  
  I would like to propose the following changes to our "network_tests" for presets:
  
   - We collocate the preset testing within the model directory, and use test annotations to control how they are run.
   - We run the smallest available preset (per model) continuously on GCP, so we get some automated coverage for our preset code.
   - We actually test the output of our smallest available preset (with a relaxed float tolerance), so we can catch code updates that would break our checkpoints.
  
  </issue>
  <code>
  [start of keras_nlp/conftest.py]
  1 # Copyright 2022 The KerasNLP Authors
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     https://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 import sys
  15 
  16 import pytest
  17 
  18 
  19 def pytest_addoption(parser):
  20     parser.addoption(
  21         "--runslow", action="store_true", default=False, help="run slow tests"
  22     )
  23 
  24 
  25 def pytest_configure(config):
  26     config.addinivalue_line("markers", "slow: mark test as slow to run")
  27 
  28 
  29 def pytest_collection_modifyitems(config, items):
  30     if config.getoption("--runslow"):
  31         # --runslow given in cli: do not skip slow tests
  32         return
  33     skip_slow = pytest.mark.skip(reason="need --runslow option to run")
  34     skip_xla = pytest.mark.skipif(
  35         sys.platform == "darwin", reason="XLA unsupported on MacOS."
  36     )
  37 
  38     for item in items:
  39         if "slow" in item.keywords:
  40             item.add_marker(skip_slow)
  41         if "jit_compile_true" in item.name:
  42             item.add_marker(skip_xla)
  43
  [end of keras_nlp/conftest.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/keras_nlp/conftest.py b/keras_nlp/conftest.py
  --- a/keras_nlp/conftest.py
  +++ b/keras_nlp/conftest.py
  @@ -18,25 +18,48 @@
   
   def pytest_addoption(parser):
       parser.addoption(
  -        "--runslow", action="store_true", default=False, help="run slow tests"
  +        "--run_large",
  +        action="store_true",
  +        default=False,
  +        help="run large tests",
  +    )
  +    parser.addoption(
  +        "--run_extra_large",
  +        action="store_true",
  +        default=False,
  +        help="run extra_large tests",
       )
   
   
   def pytest_configure(config):
  -    config.addinivalue_line("markers", "slow: mark test as slow to run")
  +    config.addinivalue_line(
  +        "markers", "large: mark test as being slow or requiring a network"
  +    )
  +    config.addinivalue_line(
  +        "markers",
  +        "extra_large: mark test as being too large to run continuously",
  +    )
   
   
   def pytest_collection_modifyitems(config, items):
  -    if config.getoption("--runslow"):
  -        # --runslow given in cli: do not skip slow tests
  -        return
  -    skip_slow = pytest.mark.skip(reason="need --runslow option to run")
  +    run_extra_large_tests = config.getoption("--run_extra_large")
  +    # Run large tests for --run_extra_large or --run_large.
  +    run_large_tests = config.getoption("--run_large") or run_extra_large_tests
  +
  +    # Messages to annotate skipped tests with.
       skip_xla = pytest.mark.skipif(
           sys.platform == "darwin", reason="XLA unsupported on MacOS."
       )
  -
  +    skip_large = pytest.mark.skipif(
  +        not run_large_tests, reason="need --run_large option to run"
  +    )
  +    skip_extra_large = pytest.mark.skipif(
  +        not run_extra_large_tests, reason="need --run_extra_large option to run"
  +    )
       for item in items:
  -        if "slow" in item.keywords:
  -            item.add_marker(skip_slow)
           if "jit_compile_true" in item.name:
               item.add_marker(skip_xla)
  +        if "large" in item.keywords:
  +            item.add_marker(skip_large)
  +        if "extra_large" in item.keywords:
  +            item.add_marker(skip_extra_large)
  
verification_info: {"golden_diff": "diff --git a/keras_nlp/conftest.py b/keras_nlp/conftest.py\n--- a/keras_nlp/conftest.py\n+++ b/keras_nlp/conftest.py\n@@ -18,25 +18,48 @@\n \n def pytest_addoption(parser):\n     parser.addoption(\n-        \"--runslow\", action=\"store_true\", default=False, help=\"run slow tests\"\n+        \"--run_large\",\n+        action=\"store_true\",\n+        default=False,\n+        help=\"run large tests\",\n+    )\n+    parser.addoption(\n+        \"--run_extra_large\",\n+        action=\"store_true\",\n+        default=False,\n+        help=\"run extra_large tests\",\n     )\n \n \n def pytest_configure(config):\n-    config.addinivalue_line(\"markers\", \"slow: mark test as slow to run\")\n+    config.addinivalue_line(\n+        \"markers\", \"large: mark test as being slow or requiring a network\"\n+    )\n+    config.addinivalue_line(\n+        \"markers\",\n+        \"extra_large: mark test as being too large to run continuously\",\n+    )\n \n \n def pytest_collection_modifyitems(config, items):\n-    if config.getoption(\"--runslow\"):\n-        # --runslow given in cli: do not skip slow tests\n-        return\n-    skip_slow = pytest.mark.skip(reason=\"need --runslow option to run\")\n+    run_extra_large_tests = config.getoption(\"--run_extra_large\")\n+    # Run large tests for --run_extra_large or --run_large.\n+    run_large_tests = config.getoption(\"--run_large\") or run_extra_large_tests\n+\n+    # Messages to annotate skipped tests with.\n     skip_xla = pytest.mark.skipif(\n         sys.platform == \"darwin\", reason=\"XLA unsupported on MacOS.\"\n     )\n-\n+    skip_large = pytest.mark.skipif(\n+        not run_large_tests, reason=\"need --run_large option to run\"\n+    )\n+    skip_extra_large = pytest.mark.skipif(\n+        not run_extra_large_tests, reason=\"need --run_extra_large option to run\"\n+    )\n     for item in items:\n-        if \"slow\" in item.keywords:\n-            item.add_marker(skip_slow)\n         if \"jit_compile_true\" in item.name:\n             item.add_marker(skip_xla)\n+        if \"large\" in item.keywords:\n+            item.add_marker(skip_large)\n+        if \"extra_large\" in item.keywords:\n+            item.add_marker(skip_extra_large)\n", "issue": "Improve our continuous testing for model presets\nOpening an issue to track the changes proposed on https://github.com/keras-team/keras-nlp/pull/357, as it has gotten slightly larger in scope.\r\n\r\nI would like to propose the following changes to our \"network_tests\" for presets:\r\n\r\n - We collocate the preset testing within the model directory, and use test annotations to control how they are run.\r\n - We run the smallest available preset (per model) continuously on GCP, so we get some automated coverage for our preset code.\r\n - We actually test the output of our smallest available preset (with a relaxed float tolerance), so we can catch code updates that would break our checkpoints.\n", "before_files": [{"content": "# Copyright 2022 The KerasNLP 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#     https://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.\nimport sys\n\nimport pytest\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--runslow\", action=\"store_true\", default=False, help=\"run slow tests\"\n    )\n\n\ndef pytest_configure(config):\n    config.addinivalue_line(\"markers\", \"slow: mark test as slow to run\")\n\n\ndef pytest_collection_modifyitems(config, items):\n    if config.getoption(\"--runslow\"):\n        # --runslow given in cli: do not skip slow tests\n        return\n    skip_slow = pytest.mark.skip(reason=\"need --runslow option to run\")\n    skip_xla = pytest.mark.skipif(\n        sys.platform == \"darwin\", reason=\"XLA unsupported on MacOS.\"\n    )\n\n    for item in items:\n        if \"slow\" in item.keywords:\n            item.add_marker(skip_slow)\n        if \"jit_compile_true\" in item.name:\n            item.add_marker(skip_xla)\n", "path": "keras_nlp/conftest.py"}]}