We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
POT -> PTQ transition in docs
Steps to be done:
- Rename POT -> PTQ
- Replace POT docs links with NNCF.PTQ docs
- Mention that the output model would be quantized to INT8

Related pages: 
https://openvinotoolkit.github.io/training_extensions/stable/guide/explanation/additional_features/models_optimization.html
https://openvinotoolkit.github.io/training_extensions/stable/guide/tutorials/base/how_to_train/classification.html#optimization and other tasks

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/otx/cli/tools/eval.py`
Content:
```
1 """Model quality evaluation tool."""
2 
3 # Copyright (C) 2021 Intel Corporation
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,
12 # software 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
15 # and limitations under the License.
16 
17 import json
18 from pathlib import Path
19 
20 # Update environment variables for CLI use
21 import otx.cli  # noqa: F401
22 from otx.api.entities.inference_parameters import InferenceParameters
23 from otx.api.entities.model_template import TaskType
24 from otx.api.entities.resultset import ResultSetEntity
25 from otx.api.entities.subset import Subset
26 from otx.api.entities.task_environment import TaskEnvironment
27 from otx.cli.manager import ConfigManager
28 from otx.cli.utils.importing import get_impl_class
29 from otx.cli.utils.io import read_model
30 from otx.cli.utils.nncf import is_checkpoint_nncf
31 from otx.cli.utils.parser import (
32     add_hyper_parameters_sub_parser,
33     get_override_param,
34     get_parser_and_hprams_data,
35 )
36 from otx.core.data.adapter import get_dataset_adapter
37 from otx.utils.logger import config_logger
38 
39 # pylint: disable=too-many-locals
40 
41 
42 def get_args():
43     """Parses command line arguments."""
44     parser, hyper_parameters, params = get_parser_and_hprams_data()
45 
46     parser.add_argument(
47         "--test-data-roots",
48         help="Comma-separated paths to test data folders.",
49     )
50     parser.add_argument(
51         "--load-weights",
52         help="Load model weights from previously saved checkpoint."
53         "It could be a trained/optimized model (POT only) or exported model.",
54     )
55     parser.add_argument(
56         "-o",
57         "--output",
58         help="Location where the intermediate output of the task will be stored.",
59     )
60     parser.add_argument(
61         "--workspace",
62         help="Path to the workspace where the command will run.",
63         default=None,
64     )
65     parser.add_argument(
66         "--data",
67         type=str,
68         default=None,
69         help="The data.yaml path want to use in train task.",
70     )
71 
72     add_hyper_parameters_sub_parser(parser, hyper_parameters, modes=("INFERENCE",))
73     override_param = get_override_param(params)
74 
75     return parser.parse_args(), override_param
76 
77 
78 def check_label_schemas(label_schema_a, label_schema_b):
79     """Checks that both passed label schemas have labels with the same names.
80 
81     If it is False that it raises RuntimeError.
82     """
83 
84     for model_label, snapshot_label in zip(label_schema_a.get_labels(False), label_schema_b.get_labels(False)):
85         if model_label.name != snapshot_label.name:
86             raise RuntimeError(
87                 "Labels schemas from model and dataset are different: " f"\n{label_schema_a} \n\tvs\n{label_schema_b}"
88             )
89 
90 
91 def main():
92     """Main function that is used for model evaluation."""
93 
94     # Dynamically create an argument parser based on override parameters.
95     args, override_param = get_args()
96 
97     config_manager = ConfigManager(args, workspace_root=args.workspace, mode="eval")
98     config_logger(config_manager.output_path / "otx.log", "INFO")
99     # Auto-Configuration for model template
100     config_manager.configure_template()
101 
102     if not args.load_weights and config_manager.check_workspace():
103         latest_model_path = (
104             config_manager.workspace_root / "outputs" / "latest_trained_model" / "models" / "weights.pth"
105         )
106         args.load_weights = str(latest_model_path)
107 
108     # Update Hyper Parameter Configs
109     hyper_parameters = config_manager.get_hyparams_config(override_param)
110 
111     # Get classes for Task, ConfigurableParameters and Dataset.
112     template = config_manager.template
113     if any(args.load_weights.endswith(x) for x in (".bin", ".xml", ".zip")):
114         task_class = get_impl_class(template.entrypoints.openvino)
115     elif args.load_weights.endswith(".pth"):
116         if is_checkpoint_nncf(args.load_weights):
117             task_class = get_impl_class(template.entrypoints.nncf)
118         else:
119             task_class = get_impl_class(template.entrypoints.base)
120     else:
121         raise ValueError(f"Unsupported file: {args.load_weights}")
122 
123     # Auto-Configuration for Dataset configuration
124     config_manager.configure_data_config(update_data_yaml=config_manager.check_workspace())
125     dataset_config = config_manager.get_dataset_config(subsets=["test"])
126     dataset_adapter = get_dataset_adapter(**dataset_config)
127     dataset, label_schema = dataset_adapter.get_otx_dataset(), dataset_adapter.get_label_schema()
128 
129     environment = TaskEnvironment(
130         model=None,
131         hyper_parameters=hyper_parameters,
132         label_schema=label_schema,
133         model_template=template,
134     )
135 
136     environment.model = read_model(environment.get_model_configuration(), args.load_weights, None)
137 
138     task = task_class(task_environment=environment)
139 
140     validation_dataset = dataset.get_subset(Subset.TESTING)
141     predicted_validation_dataset = task.infer(
142         # temp (sungchul): remain annotation for visual prompting
143         validation_dataset
144         if getattr(task, "task_type", None) == TaskType.VISUAL_PROMPTING
145         else validation_dataset.with_empty_annotations(),
146         InferenceParameters(is_evaluation=False),
147     )
148 
149     resultset = ResultSetEntity(
150         model=environment.model,
151         ground_truth_dataset=validation_dataset,
152         prediction_dataset=predicted_validation_dataset,
153     )
154     task.evaluate(resultset)
155     assert resultset.performance is not None
156     print(resultset.performance)
157 
158     output_path = Path(args.output) if args.output else config_manager.output_path
159     performance = {resultset.performance.score.name: resultset.performance.score.value}
160     if hasattr(task, "avg_time_per_image"):
161         performance["avg_time_per_image"] = task.avg_time_per_image
162     with open(output_path / "performance.json", "w", encoding="UTF-8") as write_file:
163         json.dump(performance, write_file)
164 
165     return dict(retcode=0, template=template.name)
166 
167 
168 if __name__ == "__main__":
169     main()
170
```
--- 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/src/otx/cli/tools/eval.py b/src/otx/cli/tools/eval.py
--- a/src/otx/cli/tools/eval.py
+++ b/src/otx/cli/tools/eval.py
@@ -49,8 +49,8 @@
     )
     parser.add_argument(
         "--load-weights",
-        help="Load model weights from previously saved checkpoint."
-        "It could be a trained/optimized model (POT only) or exported model.",
+        help="Load model weights from previously saved checkpoint. "
+        "It could be a trained/optimized model (with PTQ only) or exported model.",
     )
     parser.add_argument(
         "-o",

{"golden_diff": "diff --git a/src/otx/cli/tools/eval.py b/src/otx/cli/tools/eval.py\n--- a/src/otx/cli/tools/eval.py\n+++ b/src/otx/cli/tools/eval.py\n@@ -49,8 +49,8 @@\n     )\n     parser.add_argument(\n         \"--load-weights\",\n-        help=\"Load model weights from previously saved checkpoint.\"\n-        \"It could be a trained/optimized model (POT only) or exported model.\",\n+        help=\"Load model weights from previously saved checkpoint. \"\n+        \"It could be a trained/optimized model (with PTQ only) or exported model.\",\n     )\n     parser.add_argument(\n         \"-o\",\n", "issue": "POT -> PTQ transition in docs\nSteps to be done:\r\n- Rename POT -> PTQ\r\n- Replace POT docs links with NNCF.PTQ docs\r\n- Mention that the output model would be quantized to INT8\r\n\r\nRelated pages: \r\nhttps://openvinotoolkit.github.io/training_extensions/stable/guide/explanation/additional_features/models_optimization.html\r\nhttps://openvinotoolkit.github.io/training_extensions/stable/guide/tutorials/base/how_to_train/classification.html#optimization and other tasks\n", "before_files": [{"content": "\"\"\"Model quality evaluation tool.\"\"\"\n\n# Copyright (C) 2021 Intel Corporation\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,\n# software 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\n# and limitations under the License.\n\nimport json\nfrom pathlib import Path\n\n# Update environment variables for CLI use\nimport otx.cli  # noqa: F401\nfrom otx.api.entities.inference_parameters import InferenceParameters\nfrom otx.api.entities.model_template import TaskType\nfrom otx.api.entities.resultset import ResultSetEntity\nfrom otx.api.entities.subset import Subset\nfrom otx.api.entities.task_environment import TaskEnvironment\nfrom otx.cli.manager import ConfigManager\nfrom otx.cli.utils.importing import get_impl_class\nfrom otx.cli.utils.io import read_model\nfrom otx.cli.utils.nncf import is_checkpoint_nncf\nfrom otx.cli.utils.parser import (\n    add_hyper_parameters_sub_parser,\n    get_override_param,\n    get_parser_and_hprams_data,\n)\nfrom otx.core.data.adapter import get_dataset_adapter\nfrom otx.utils.logger import config_logger\n\n# pylint: disable=too-many-locals\n\n\ndef get_args():\n    \"\"\"Parses command line arguments.\"\"\"\n    parser, hyper_parameters, params = get_parser_and_hprams_data()\n\n    parser.add_argument(\n        \"--test-data-roots\",\n        help=\"Comma-separated paths to test data folders.\",\n    )\n    parser.add_argument(\n        \"--load-weights\",\n        help=\"Load model weights from previously saved checkpoint.\"\n        \"It could be a trained/optimized model (POT only) or exported model.\",\n    )\n    parser.add_argument(\n        \"-o\",\n        \"--output\",\n        help=\"Location where the intermediate output of the task will be stored.\",\n    )\n    parser.add_argument(\n        \"--workspace\",\n        help=\"Path to the workspace where the command will run.\",\n        default=None,\n    )\n    parser.add_argument(\n        \"--data\",\n        type=str,\n        default=None,\n        help=\"The data.yaml path want to use in train task.\",\n    )\n\n    add_hyper_parameters_sub_parser(parser, hyper_parameters, modes=(\"INFERENCE\",))\n    override_param = get_override_param(params)\n\n    return parser.parse_args(), override_param\n\n\ndef check_label_schemas(label_schema_a, label_schema_b):\n    \"\"\"Checks that both passed label schemas have labels with the same names.\n\n    If it is False that it raises RuntimeError.\n    \"\"\"\n\n    for model_label, snapshot_label in zip(label_schema_a.get_labels(False), label_schema_b.get_labels(False)):\n        if model_label.name != snapshot_label.name:\n            raise RuntimeError(\n                \"Labels schemas from model and dataset are different: \" f\"\\n{label_schema_a} \\n\\tvs\\n{label_schema_b}\"\n            )\n\n\ndef main():\n    \"\"\"Main function that is used for model evaluation.\"\"\"\n\n    # Dynamically create an argument parser based on override parameters.\n    args, override_param = get_args()\n\n    config_manager = ConfigManager(args, workspace_root=args.workspace, mode=\"eval\")\n    config_logger(config_manager.output_path / \"otx.log\", \"INFO\")\n    # Auto-Configuration for model template\n    config_manager.configure_template()\n\n    if not args.load_weights and config_manager.check_workspace():\n        latest_model_path = (\n            config_manager.workspace_root / \"outputs\" / \"latest_trained_model\" / \"models\" / \"weights.pth\"\n        )\n        args.load_weights = str(latest_model_path)\n\n    # Update Hyper Parameter Configs\n    hyper_parameters = config_manager.get_hyparams_config(override_param)\n\n    # Get classes for Task, ConfigurableParameters and Dataset.\n    template = config_manager.template\n    if any(args.load_weights.endswith(x) for x in (\".bin\", \".xml\", \".zip\")):\n        task_class = get_impl_class(template.entrypoints.openvino)\n    elif args.load_weights.endswith(\".pth\"):\n        if is_checkpoint_nncf(args.load_weights):\n            task_class = get_impl_class(template.entrypoints.nncf)\n        else:\n            task_class = get_impl_class(template.entrypoints.base)\n    else:\n        raise ValueError(f\"Unsupported file: {args.load_weights}\")\n\n    # Auto-Configuration for Dataset configuration\n    config_manager.configure_data_config(update_data_yaml=config_manager.check_workspace())\n    dataset_config = config_manager.get_dataset_config(subsets=[\"test\"])\n    dataset_adapter = get_dataset_adapter(**dataset_config)\n    dataset, label_schema = dataset_adapter.get_otx_dataset(), dataset_adapter.get_label_schema()\n\n    environment = TaskEnvironment(\n        model=None,\n        hyper_parameters=hyper_parameters,\n        label_schema=label_schema,\n        model_template=template,\n    )\n\n    environment.model = read_model(environment.get_model_configuration(), args.load_weights, None)\n\n    task = task_class(task_environment=environment)\n\n    validation_dataset = dataset.get_subset(Subset.TESTING)\n    predicted_validation_dataset = task.infer(\n        # temp (sungchul): remain annotation for visual prompting\n        validation_dataset\n        if getattr(task, \"task_type\", None) == TaskType.VISUAL_PROMPTING\n        else validation_dataset.with_empty_annotations(),\n        InferenceParameters(is_evaluation=False),\n    )\n\n    resultset = ResultSetEntity(\n        model=environment.model,\n        ground_truth_dataset=validation_dataset,\n        prediction_dataset=predicted_validation_dataset,\n    )\n    task.evaluate(resultset)\n    assert resultset.performance is not None\n    print(resultset.performance)\n\n    output_path = Path(args.output) if args.output else config_manager.output_path\n    performance = {resultset.performance.score.name: resultset.performance.score.value}\n    if hasattr(task, \"avg_time_per_image\"):\n        performance[\"avg_time_per_image\"] = task.avg_time_per_image\n    with open(output_path / \"performance.json\", \"w\", encoding=\"UTF-8\") as write_file:\n        json.dump(performance, write_file)\n\n    return dict(retcode=0, template=template.name)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "src/otx/cli/tools/eval.py"}], "after_files": [{"content": "\"\"\"Model quality evaluation tool.\"\"\"\n\n# Copyright (C) 2021 Intel Corporation\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,\n# software 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\n# and limitations under the License.\n\nimport json\nfrom pathlib import Path\n\n# Update environment variables for CLI use\nimport otx.cli  # noqa: F401\nfrom otx.api.entities.inference_parameters import InferenceParameters\nfrom otx.api.entities.model_template import TaskType\nfrom otx.api.entities.resultset import ResultSetEntity\nfrom otx.api.entities.subset import Subset\nfrom otx.api.entities.task_environment import TaskEnvironment\nfrom otx.cli.manager import ConfigManager\nfrom otx.cli.utils.importing import get_impl_class\nfrom otx.cli.utils.io import read_model\nfrom otx.cli.utils.nncf import is_checkpoint_nncf\nfrom otx.cli.utils.parser import (\n    add_hyper_parameters_sub_parser,\n    get_override_param,\n    get_parser_and_hprams_data,\n)\nfrom otx.core.data.adapter import get_dataset_adapter\nfrom otx.utils.logger import config_logger\n\n# pylint: disable=too-many-locals\n\n\ndef get_args():\n    \"\"\"Parses command line arguments.\"\"\"\n    parser, hyper_parameters, params = get_parser_and_hprams_data()\n\n    parser.add_argument(\n        \"--test-data-roots\",\n        help=\"Comma-separated paths to test data folders.\",\n    )\n    parser.add_argument(\n        \"--load-weights\",\n        help=\"Load model weights from previously saved checkpoint. \"\n        \"It could be a trained/optimized model (with PTQ only) or exported model.\",\n    )\n    parser.add_argument(\n        \"-o\",\n        \"--output\",\n        help=\"Location where the intermediate output of the task will be stored.\",\n    )\n    parser.add_argument(\n        \"--workspace\",\n        help=\"Path to the workspace where the command will run.\",\n        default=None,\n    )\n    parser.add_argument(\n        \"--data\",\n        type=str,\n        default=None,\n        help=\"The data.yaml path want to use in train task.\",\n    )\n\n    add_hyper_parameters_sub_parser(parser, hyper_parameters, modes=(\"INFERENCE\",))\n    override_param = get_override_param(params)\n\n    return parser.parse_args(), override_param\n\n\ndef check_label_schemas(label_schema_a, label_schema_b):\n    \"\"\"Checks that both passed label schemas have labels with the same names.\n\n    If it is False that it raises RuntimeError.\n    \"\"\"\n\n    for model_label, snapshot_label in zip(label_schema_a.get_labels(False), label_schema_b.get_labels(False)):\n        if model_label.name != snapshot_label.name:\n            raise RuntimeError(\n                \"Labels schemas from model and dataset are different: \" f\"\\n{label_schema_a} \\n\\tvs\\n{label_schema_b}\"\n            )\n\n\ndef main():\n    \"\"\"Main function that is used for model evaluation.\"\"\"\n\n    # Dynamically create an argument parser based on override parameters.\n    args, override_param = get_args()\n\n    config_manager = ConfigManager(args, workspace_root=args.workspace, mode=\"eval\")\n    config_logger(config_manager.output_path / \"otx.log\", \"INFO\")\n    # Auto-Configuration for model template\n    config_manager.configure_template()\n\n    if not args.load_weights and config_manager.check_workspace():\n        latest_model_path = (\n            config_manager.workspace_root / \"outputs\" / \"latest_trained_model\" / \"models\" / \"weights.pth\"\n        )\n        args.load_weights = str(latest_model_path)\n\n    # Update Hyper Parameter Configs\n    hyper_parameters = config_manager.get_hyparams_config(override_param)\n\n    # Get classes for Task, ConfigurableParameters and Dataset.\n    template = config_manager.template\n    if any(args.load_weights.endswith(x) for x in (\".bin\", \".xml\", \".zip\")):\n        task_class = get_impl_class(template.entrypoints.openvino)\n    elif args.load_weights.endswith(\".pth\"):\n        if is_checkpoint_nncf(args.load_weights):\n            task_class = get_impl_class(template.entrypoints.nncf)\n        else:\n            task_class = get_impl_class(template.entrypoints.base)\n    else:\n        raise ValueError(f\"Unsupported file: {args.load_weights}\")\n\n    # Auto-Configuration for Dataset configuration\n    config_manager.configure_data_config(update_data_yaml=config_manager.check_workspace())\n    dataset_config = config_manager.get_dataset_config(subsets=[\"test\"])\n    dataset_adapter = get_dataset_adapter(**dataset_config)\n    dataset, label_schema = dataset_adapter.get_otx_dataset(), dataset_adapter.get_label_schema()\n\n    environment = TaskEnvironment(\n        model=None,\n        hyper_parameters=hyper_parameters,\n        label_schema=label_schema,\n        model_template=template,\n    )\n\n    environment.model = read_model(environment.get_model_configuration(), args.load_weights, None)\n\n    task = task_class(task_environment=environment)\n\n    validation_dataset = dataset.get_subset(Subset.TESTING)\n    predicted_validation_dataset = task.infer(\n        # temp (sungchul): remain annotation for visual prompting\n        validation_dataset\n        if getattr(task, \"task_type\", None) == TaskType.VISUAL_PROMPTING\n        else validation_dataset.with_empty_annotations(),\n        InferenceParameters(is_evaluation=False),\n    )\n\n    resultset = ResultSetEntity(\n        model=environment.model,\n        ground_truth_dataset=validation_dataset,\n        prediction_dataset=predicted_validation_dataset,\n    )\n    task.evaluate(resultset)\n    assert resultset.performance is not None\n    print(resultset.performance)\n\n    output_path = Path(args.output) if args.output else config_manager.output_path\n    performance = {resultset.performance.score.name: resultset.performance.score.value}\n    if hasattr(task, \"avg_time_per_image\"):\n        performance[\"avg_time_per_image\"] = task.avg_time_per_image\n    with open(output_path / \"performance.json\", \"w\", encoding=\"UTF-8\") as write_file:\n        json.dump(performance, write_file)\n\n    return dict(retcode=0, template=template.name)\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "src/otx/cli/tools/eval.py"}]}