We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix saved model testing
We have a silly bug for a few of our saved model tests where we are calling

```
model.save(save_path, save_format)
```

Instead of

```
model.save(save_path, save_format=save_format)
```

Which means we aren't properly the h5 format. If you fix this issue, you actually hit another issue with h5 saving.

`FAILED keras_nlp/models/bert/bert_tasks_test.py::BertClassifierTest::test_saving_model_save_format_h5 - ValueError: Unknown layer: BertClassifier. Please ensure this object is passed to the `custom_objects` argument.`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `keras_nlp/conftest.py`
Content:
```
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         "--run_large",
22         action="store_true",
23         default=False,
24         help="run large tests",
25     )
26     parser.addoption(
27         "--run_extra_large",
28         action="store_true",
29         default=False,
30         help="run extra_large tests",
31     )
32 
33 
34 def pytest_configure(config):
35     config.addinivalue_line(
36         "markers", "large: mark test as being slow or requiring a network"
37     )
38     config.addinivalue_line(
39         "markers",
40         "extra_large: mark test as being too large to run continuously",
41     )
42 
43 
44 def pytest_collection_modifyitems(config, items):
45     run_extra_large_tests = config.getoption("--run_extra_large")
46     # Run large tests for --run_extra_large or --run_large.
47     run_large_tests = config.getoption("--run_large") or run_extra_large_tests
48 
49     # Messages to annotate skipped tests with.
50     skip_xla = pytest.mark.skipif(
51         sys.platform == "darwin", reason="XLA unsupported on MacOS."
52     )
53     skip_large = pytest.mark.skipif(
54         not run_large_tests, reason="need --run_large option to run"
55     )
56     skip_extra_large = pytest.mark.skipif(
57         not run_extra_large_tests, reason="need --run_extra_large option to run"
58     )
59     for item in items:
60         if "jit_compile_true" in item.name:
61             item.add_marker(skip_xla)
62         if "large" in item.keywords:
63             item.add_marker(skip_large)
64         if "extra_large" in item.keywords:
65             item.add_marker(skip_extra_large)
66
```
--- 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/keras_nlp/conftest.py b/keras_nlp/conftest.py
--- a/keras_nlp/conftest.py
+++ b/keras_nlp/conftest.py
@@ -14,6 +14,8 @@
 import sys
 
 import pytest
+import tensorflow as tf
+from packaging import version
 
 
 def pytest_addoption(parser):
@@ -50,6 +52,10 @@
     skip_xla = pytest.mark.skipif(
         sys.platform == "darwin", reason="XLA unsupported on MacOS."
     )
+    skip_keras_saving_test = pytest.mark.skipif(
+        version.parse(tf.__version__) < version.parse("2.12"),
+        reason="keras_v3 format requires tf > 2.12.",
+    )
     skip_large = pytest.mark.skipif(
         not run_large_tests, reason="need --run_large option to run"
     )
@@ -59,6 +65,8 @@
     for item in items:
         if "jit_compile_true" in item.name:
             item.add_marker(skip_xla)
+        if "keras_format" in item.name:
+            item.add_marker(skip_keras_saving_test)
         if "large" in item.keywords:
             item.add_marker(skip_large)
         if "extra_large" in item.keywords:

{"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@@ -14,6 +14,8 @@\n import sys\n \n import pytest\n+import tensorflow as tf\n+from packaging import version\n \n \n def pytest_addoption(parser):\n@@ -50,6 +52,10 @@\n     skip_xla = pytest.mark.skipif(\n         sys.platform == \"darwin\", reason=\"XLA unsupported on MacOS.\"\n     )\n+    skip_keras_saving_test = pytest.mark.skipif(\n+        version.parse(tf.__version__) < version.parse(\"2.12\"),\n+        reason=\"keras_v3 format requires tf > 2.12.\",\n+    )\n     skip_large = pytest.mark.skipif(\n         not run_large_tests, reason=\"need --run_large option to run\"\n     )\n@@ -59,6 +65,8 @@\n     for item in items:\n         if \"jit_compile_true\" in item.name:\n             item.add_marker(skip_xla)\n+        if \"keras_format\" in item.name:\n+            item.add_marker(skip_keras_saving_test)\n         if \"large\" in item.keywords:\n             item.add_marker(skip_large)\n         if \"extra_large\" in item.keywords:\n", "issue": "Fix saved model testing\nWe have a silly bug for a few of our saved model tests where we are calling\r\n\r\n```\r\nmodel.save(save_path, save_format)\r\n```\r\n\r\nInstead of\r\n\r\n```\r\nmodel.save(save_path, save_format=save_format)\r\n```\r\n\r\nWhich means we aren't properly the h5 format. If you fix this issue, you actually hit another issue with h5 saving.\r\n\r\n`FAILED keras_nlp/models/bert/bert_tasks_test.py::BertClassifierTest::test_saving_model_save_format_h5 - ValueError: Unknown layer: BertClassifier. Please ensure this object is passed to the `custom_objects` argument.`\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        \"--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\ndef pytest_configure(config):\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\ndef pytest_collection_modifyitems(config, items):\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    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 \"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", "path": "keras_nlp/conftest.py"}], "after_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\nimport tensorflow as tf\nfrom packaging import version\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\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\ndef pytest_configure(config):\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\ndef pytest_collection_modifyitems(config, items):\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    skip_keras_saving_test = pytest.mark.skipif(\n        version.parse(tf.__version__) < version.parse(\"2.12\"),\n        reason=\"keras_v3 format requires tf > 2.12.\",\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 \"jit_compile_true\" in item.name:\n            item.add_marker(skip_xla)\n        if \"keras_format\" in item.name:\n            item.add_marker(skip_keras_saving_test)\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", "path": "keras_nlp/conftest.py"}]}