We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
SMAPE formula typo
## 📚 Documentation


There's a typo in the [SMAPE formula](https://torchmetrics.readthedocs.io/en/stable/regression/symmetric_mean_absolute_percentage_error.html). It should be `{SMAPE} = \frac{2}{n}\sum_1^n\frac{|   y_i - \hat{y_i} |}{\max(| y_i | + | \hat{y_i} |, \epsilon)}` instead of `{SMAPE} = \frac{2}{n}\sum_1^n max(\frac{|   y_i - \hat{y_i} |}{| y_i | + | \hat{y_i} |, \epsilon})`. The attached screenshot shows the typo and its correction.
![smape](https://user-images.githubusercontent.com/44662992/213825207-21c308b1-a407-4830-813f-a3dbe87ddb41.png)


--- 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/torchmetrics/regression/symmetric_mape.py`
Content:
```
1 # Copyright The PyTorch Lightning team.
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 #     http://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 from typing import Any
15 
16 from torch import Tensor, tensor
17 
18 from torchmetrics.functional.regression.symmetric_mape import (
19     _symmetric_mean_absolute_percentage_error_compute,
20     _symmetric_mean_absolute_percentage_error_update,
21 )
22 from torchmetrics.metric import Metric
23 
24 
25 class SymmetricMeanAbsolutePercentageError(Metric):
26     r"""Computes symmetric mean absolute percentage error (`SMAPE`_).
27 
28     .. math:: \text{SMAPE} = \frac{2}{n}\sum_1^n max(\frac{|   y_i - \hat{y_i} |}{| y_i | + | \hat{y_i} |, \epsilon})
29 
30     Where :math:`y` is a tensor of target values, and :math:`\hat{y}` is a tensor of predictions.
31 
32     As input to ``forward`` and ``update`` the metric accepts the following input:
33 
34     - ``preds`` (:class:`~torch.Tensor`): Predictions from model
35     - ``target`` (:class:`~torch.Tensor`): Ground truth values
36 
37     As output of ``forward`` and ``compute`` the metric returns the following output:
38 
39     - ``smape`` (:class:`~torch.Tensor`): A tensor with non-negative floating point smape value between 0 and 1
40 
41     Args:
42         kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
43 
44     Example:
45         >>> from torchmetrics import SymmetricMeanAbsolutePercentageError
46         >>> target = tensor([1, 10, 1e6])
47         >>> preds = tensor([0.9, 15, 1.2e6])
48         >>> smape = SymmetricMeanAbsolutePercentageError()
49         >>> smape(preds, target)
50         tensor(0.2290)
51     """
52     is_differentiable: bool = True
53     higher_is_better: bool = False
54     full_state_update: bool = False
55     sum_abs_per_error: Tensor
56     total: Tensor
57 
58     def __init__(
59         self,
60         **kwargs: Any,
61     ) -> None:
62         super().__init__(**kwargs)
63 
64         self.add_state("sum_abs_per_error", default=tensor(0.0), dist_reduce_fx="sum")
65         self.add_state("total", default=tensor(0.0), dist_reduce_fx="sum")
66 
67     def update(self, preds: Tensor, target: Tensor) -> None:  # type: ignore
68         """Update state with predictions and targets."""
69         sum_abs_per_error, num_obs = _symmetric_mean_absolute_percentage_error_update(preds, target)
70 
71         self.sum_abs_per_error += sum_abs_per_error
72         self.total += num_obs
73 
74     def compute(self) -> Tensor:
75         """Computes mean absolute percentage error over state."""
76         return _symmetric_mean_absolute_percentage_error_compute(self.sum_abs_per_error, self.total)
77
```
--- 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/torchmetrics/regression/symmetric_mape.py b/src/torchmetrics/regression/symmetric_mape.py
--- a/src/torchmetrics/regression/symmetric_mape.py
+++ b/src/torchmetrics/regression/symmetric_mape.py
@@ -25,7 +25,7 @@
 class SymmetricMeanAbsolutePercentageError(Metric):
     r"""Computes symmetric mean absolute percentage error (`SMAPE`_).
 
-    .. math:: \text{SMAPE} = \frac{2}{n}\sum_1^n max(\frac{|   y_i - \hat{y_i} |}{| y_i | + | \hat{y_i} |, \epsilon})
+    .. math:: \text{SMAPE} = \frac{2}{n}\sum_1^n\frac{|   y_i - \hat{y_i} |}{\max(| y_i | + | \hat{y_i} |, \epsilon)}
 
     Where :math:`y` is a tensor of target values, and :math:`\hat{y}` is a tensor of predictions.

{"golden_diff": "diff --git a/src/torchmetrics/regression/symmetric_mape.py b/src/torchmetrics/regression/symmetric_mape.py\n--- a/src/torchmetrics/regression/symmetric_mape.py\n+++ b/src/torchmetrics/regression/symmetric_mape.py\n@@ -25,7 +25,7 @@\n class SymmetricMeanAbsolutePercentageError(Metric):\n     r\"\"\"Computes symmetric mean absolute percentage error (`SMAPE`_).\n \n-    .. math:: \\text{SMAPE} = \\frac{2}{n}\\sum_1^n max(\\frac{|   y_i - \\hat{y_i} |}{| y_i | + | \\hat{y_i} |, \\epsilon})\n+    .. math:: \\text{SMAPE} = \\frac{2}{n}\\sum_1^n\\frac{|   y_i - \\hat{y_i} |}{\\max(| y_i | + | \\hat{y_i} |, \\epsilon)}\n \n     Where :math:`y` is a tensor of target values, and :math:`\\hat{y}` is a tensor of predictions.\n", "issue": "SMAPE formula typo\n## \ud83d\udcda Documentation\r\n\r\n\r\nThere's a typo in the [SMAPE formula](https://torchmetrics.readthedocs.io/en/stable/regression/symmetric_mean_absolute_percentage_error.html). It should be `{SMAPE} = \\frac{2}{n}\\sum_1^n\\frac{|   y_i - \\hat{y_i} |}{\\max(| y_i | + | \\hat{y_i} |, \\epsilon)}` instead of `{SMAPE} = \\frac{2}{n}\\sum_1^n max(\\frac{|   y_i - \\hat{y_i} |}{| y_i | + | \\hat{y_i} |, \\epsilon})`. The attached screenshot shows the typo and its correction.\r\n![smape](https://user-images.githubusercontent.com/44662992/213825207-21c308b1-a407-4830-813f-a3dbe87ddb41.png)\r\n\n", "before_files": [{"content": "# Copyright The PyTorch Lightning team.\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.\nfrom typing import Any\n\nfrom torch import Tensor, tensor\n\nfrom torchmetrics.functional.regression.symmetric_mape import (\n    _symmetric_mean_absolute_percentage_error_compute,\n    _symmetric_mean_absolute_percentage_error_update,\n)\nfrom torchmetrics.metric import Metric\n\n\nclass SymmetricMeanAbsolutePercentageError(Metric):\n    r\"\"\"Computes symmetric mean absolute percentage error (`SMAPE`_).\n\n    .. math:: \\text{SMAPE} = \\frac{2}{n}\\sum_1^n max(\\frac{|   y_i - \\hat{y_i} |}{| y_i | + | \\hat{y_i} |, \\epsilon})\n\n    Where :math:`y` is a tensor of target values, and :math:`\\hat{y}` is a tensor of predictions.\n\n    As input to ``forward`` and ``update`` the metric accepts the following input:\n\n    - ``preds`` (:class:`~torch.Tensor`): Predictions from model\n    - ``target`` (:class:`~torch.Tensor`): Ground truth values\n\n    As output of ``forward`` and ``compute`` the metric returns the following output:\n\n    - ``smape`` (:class:`~torch.Tensor`): A tensor with non-negative floating point smape value between 0 and 1\n\n    Args:\n        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.\n\n    Example:\n        >>> from torchmetrics import SymmetricMeanAbsolutePercentageError\n        >>> target = tensor([1, 10, 1e6])\n        >>> preds = tensor([0.9, 15, 1.2e6])\n        >>> smape = SymmetricMeanAbsolutePercentageError()\n        >>> smape(preds, target)\n        tensor(0.2290)\n    \"\"\"\n    is_differentiable: bool = True\n    higher_is_better: bool = False\n    full_state_update: bool = False\n    sum_abs_per_error: Tensor\n    total: Tensor\n\n    def __init__(\n        self,\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(**kwargs)\n\n        self.add_state(\"sum_abs_per_error\", default=tensor(0.0), dist_reduce_fx=\"sum\")\n        self.add_state(\"total\", default=tensor(0.0), dist_reduce_fx=\"sum\")\n\n    def update(self, preds: Tensor, target: Tensor) -> None:  # type: ignore\n        \"\"\"Update state with predictions and targets.\"\"\"\n        sum_abs_per_error, num_obs = _symmetric_mean_absolute_percentage_error_update(preds, target)\n\n        self.sum_abs_per_error += sum_abs_per_error\n        self.total += num_obs\n\n    def compute(self) -> Tensor:\n        \"\"\"Computes mean absolute percentage error over state.\"\"\"\n        return _symmetric_mean_absolute_percentage_error_compute(self.sum_abs_per_error, self.total)\n", "path": "src/torchmetrics/regression/symmetric_mape.py"}], "after_files": [{"content": "# Copyright The PyTorch Lightning team.\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.\nfrom typing import Any\n\nfrom torch import Tensor, tensor\n\nfrom torchmetrics.functional.regression.symmetric_mape import (\n    _symmetric_mean_absolute_percentage_error_compute,\n    _symmetric_mean_absolute_percentage_error_update,\n)\nfrom torchmetrics.metric import Metric\n\n\nclass SymmetricMeanAbsolutePercentageError(Metric):\n    r\"\"\"Computes symmetric mean absolute percentage error (`SMAPE`_).\n\n    .. math:: \\text{SMAPE} = \\frac{2}{n}\\sum_1^n\\frac{|   y_i - \\hat{y_i} |}{\\max(| y_i | + | \\hat{y_i} |, \\epsilon)}\n\n    Where :math:`y` is a tensor of target values, and :math:`\\hat{y}` is a tensor of predictions.\n\n    As input to ``forward`` and ``update`` the metric accepts the following input:\n\n    - ``preds`` (:class:`~torch.Tensor`): Predictions from model\n    - ``target`` (:class:`~torch.Tensor`): Ground truth values\n\n    As output of ``forward`` and ``compute`` the metric returns the following output:\n\n    - ``smape`` (:class:`~torch.Tensor`): A tensor with non-negative floating point smape value between 0 and 1\n\n    Args:\n        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.\n\n    Example:\n        >>> from torchmetrics import SymmetricMeanAbsolutePercentageError\n        >>> target = tensor([1, 10, 1e6])\n        >>> preds = tensor([0.9, 15, 1.2e6])\n        >>> smape = SymmetricMeanAbsolutePercentageError()\n        >>> smape(preds, target)\n        tensor(0.2290)\n    \"\"\"\n    is_differentiable: bool = True\n    higher_is_better: bool = False\n    full_state_update: bool = False\n    sum_abs_per_error: Tensor\n    total: Tensor\n\n    def __init__(\n        self,\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(**kwargs)\n\n        self.add_state(\"sum_abs_per_error\", default=tensor(0.0), dist_reduce_fx=\"sum\")\n        self.add_state(\"total\", default=tensor(0.0), dist_reduce_fx=\"sum\")\n\n    def update(self, preds: Tensor, target: Tensor) -> None:  # type: ignore\n        \"\"\"Update state with predictions and targets.\"\"\"\n        sum_abs_per_error, num_obs = _symmetric_mean_absolute_percentage_error_update(preds, target)\n\n        self.sum_abs_per_error += sum_abs_per_error\n        self.total += num_obs\n\n    def compute(self) -> Tensor:\n        \"\"\"Computes mean absolute percentage error over state.\"\"\"\n        return _symmetric_mean_absolute_percentage_error_compute(self.sum_abs_per_error, self.total)\n", "path": "src/torchmetrics/regression/symmetric_mape.py"}]}