# AlreadyExistsError: Another metric with the same name already exists

**URL:** <https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486>\
**Category:** General Discussion\
**Tags:** keras, models, help\_request\
**Created:** [August 19, 2021, 8:22am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486 "2021-08-19T08:22:47Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![takumatix](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/takumatix/32/7091_2.png) [@takumatix](https://discuss.ai.google.dev/u/takumatix)\
**Post date:** [August 19, 2021, 8:22am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/1 "2021-08-19T08:22:47Z")

</div>

Dear All,

I’ve updated Tensorflow and Keras to 2.6.0. (I use Windows 10 and Python 3.9.6)

While trying to follow this tutorial, [Next-Frame Video Prediction with Convolutional LSTMs](https://keras.io/examples/vision/conv_lstm/)

```
import numpy as np
import matplotlib.pyplot as plt

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers

```

I’ve faced the following issue.

```
---------------------------------------------------------------------------
AlreadyExistsError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16440/2264619257.py in <module>
      4 import tensorflow as tf
      5 from tensorflow import keras
----> 6 from tensorflow.keras import layers
      7 
      8 import io

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\api\_v2\keras\ __init__.py in <module>
      8 import sys as _sys
      9 
---> 10 from keras import __version__
     11 from keras.api._v2.keras import __internal__
     12 from keras.api._v2.keras import activations

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\ __init__.py in <module>
     23 
     24 # See b/110718070#comment18 for more details about this import.
---> 25 from keras import models
     26 
     27 from keras.engine.input_layer import Input

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\models.py in <module>
     18 import tensorflow.compat.v2 as tf
     19 from keras import backend
---> 20 from keras import metrics as metrics_module
     21 from keras import optimizer_v1
     22 from keras.engine import functional

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\metrics.py in <module>
     24 
     25 import numpy as np
---> 26 from keras import activations
     27 from keras import backend
     28 from keras.engine import base_layer

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\activations.py in <module>
     18 
     19 from keras import backend
---> 20 from keras.layers import advanced_activations
     21 from keras.utils.generic_utils import deserialize_keras_object
     22 from keras.utils.generic_utils import serialize_keras_object

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\layers\ __init__.py in <module>
     21 
     22 # Generic layers.
---> 23 from keras.engine.input_layer import Input
     24 from keras.engine.input_layer import InputLayer
     25 from keras.engine.input_spec import InputSpec

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\engine\input_layer.py in <module>
     19 from keras import backend
     20 from keras.distribute import distributed_training_utils
---> 21 from keras.engine import base_layer
     22 from keras.engine import keras_tensor
     23 from keras.engine import node as node_module

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\engine\base_layer.py in <module>
     40 from keras.engine import node as node_module
     41 from keras.mixed_precision import autocast_variable
---> 42 from keras.mixed_precision import loss_scale_optimizer
     43 from keras.mixed_precision import policy
     44 from keras.saving.saved_model import layer_serialization

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\mixed_precision\loss_scale_optimizer.py in <module>
     16 
     17 from keras import backend
---> 18 from keras import optimizers
     19 from keras.mixed_precision import loss_scale as keras_loss_scale_module
     20 from keras.optimizer_v2 import optimizer_v2

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizers.py in <module>
     24 from keras.optimizer_v1 import Optimizer
     25 from keras.optimizer_v1 import TFOptimizer
---> 26 from keras.optimizer_v2 import adadelta as adadelta_v2
     27 from keras.optimizer_v2 import adagrad as adagrad_v2
     28 from keras.optimizer_v2 import adam as adam_v2

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizer_v2\adadelta.py in <module>
     20 import numpy as np
     21 from keras import backend_config
---> 22 from keras.optimizer_v2 import optimizer_v2
     23 from tensorflow.python.util.tf_export import keras_export
     24 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\keras\optimizer_v2\optimizer_v2.py in <module>
     34 
     35 
---> 36 keras_optimizers_gauge = tf. __internal__.monitoring.BoolGauge(
     37 "/tensorflow/api/keras/optimizers", "keras optimizer usage", "method")
     38 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\tensorflow\python\eager\monitoring.py in __init__ (self, name, description, *labels)
    358 *labels: The label list of the new metric.
    359 """
--> 360 super(BoolGauge, self). __init__ ('BoolGauge', _bool_gauge_methods,
    361 len(labels), name, description, *labels)
    362 

c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\tensorflow\python\eager\monitoring.py in __init__ (self, metric_name, metric_methods, label_length, *args)
    133 self._metric_name, len(self._metric_methods)))
    134 
--> 135 self._metric = self._metric_methods[self._label_length].create(*args)
    136 
    137 def __del__ (self):

AlreadyExistsError: Another metric with the same name already exists.

```

---

<div class="post-metadata">

**Author:** ![lgusm](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lgusm/32/6230_2.png) [@lgusm](https://discuss.ai.google.dev/u/lgusm)\
**Post date:** [August 19, 2021, 11:51am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/3 "2021-08-19T11:51:36Z")

</div>

Do you have an env with Python 3.7? could you try on that?

I’m asking because on Colab (Python 3.7.11), that cell worked fine.  
This is just to help find the issue.

---

<div class="post-metadata">

**Author:** ![takumatix](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/takumatix/32/7091_2.png) [@takumatix](https://discuss.ai.google.dev/u/takumatix)\
**Post date:** [August 19, 2021, 10:58pm UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/5 "2021-08-19T22:58:19Z")

</div>

I tried using Python 3.7.9 …

No issue here.

---

<div class="post-metadata">

**Author:** ![lgusm](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lgusm/32/6230_2.png) [@lgusm](https://discuss.ai.google.dev/u/lgusm)\
**Post date:** [August 19, 2021, 11:22pm UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/6 "2021-08-19T23:22:35Z")

</div>

hummm, can you please create a bug on the TF repo?

---

<div class="post-metadata">

**Author:** ![takumatix](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/takumatix/32/7091_2.png) [@takumatix](https://discuss.ai.google.dev/u/takumatix)\
**Post date:** [August 20, 2021, 10:00am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/8 "2021-08-20T10:00:01Z")

</div>

I’ve raised an issue

> <https://github.com/tensorflow/tensorflow/issues/51592>
>
> \*\*System information\*\*
> \- Have I written custom code (as opposed to using a stoc…k example script provided in TensorFlow): \[I used this example\](https://keras.io/examples/vision/conv\_lstm/)
> \- OS Platform and Distribution: Windows 10 10.0.19043 Build 19043
> \- TensorFlow installed from (source or binary): Using pip
> \- TensorFlow version (use command below): 2.6.0
> \- Python version: 3.9.6
> \- CUDA/cuDNN version: V11.4.48
> \- GPU model and memory: NVIDIA GeForce RTX 3090, 24 GB
> 
> \*\*Describe the current behavior\*\*
> I’ve updated Tensorflow and Keras to 2.6.0.
> 
> \`\`\`
> import numpy as np
> import matplotlib.pyplot as plt
> 
> import tensorflow as tf
> from tensorflow import keras
> from tensorflow.keras import layers
> \`\`\`
> 
> I’ve faced the following issue.
> 
> \`\`\`
> \---------------------------------------------------------------------------
> AlreadyExistsError Traceback (most recent call last)
> ~\\AppData\\Local\\Temp/ipykernel\_16440/2264619257.py in \<module\>
> 4 import tensorflow as tf
> 5 from tensorflow import keras
> \----\> 6 from tensorflow.keras import layers
> 7 
> 8 import io
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\api\\\_v2\\keras\\\_\_init\_\_.py in \<module\>
> 8 import sys as \_sys
> 9 
> \---\> 10 from keras import \_\_version\_\_
> 11 from keras.api.\_v2.keras import \_\_internal\_\_
> 12 from keras.api.\_v2.keras import activations
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\\_\_init\_\_.py in \<module\>
> 23 
> 24 # See b/110718070#comment18 for more details about this import.
> \---\> 25 from keras import models
> 26 
> 27 from keras.engine.input\_layer import Input
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\models.py in \<module\>
> 18 import tensorflow.compat.v2 as tf
> 19 from keras import backend
> \---\> 20 from keras import metrics as metrics\_module
> 21 from keras import optimizer\_v1
> 22 from keras.engine import functional
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\metrics.py in \<module\>
> 24 
> 25 import numpy as np
> \---\> 26 from keras import activations
> 27 from keras import backend
> 28 from keras.engine import base\_layer
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\activations.py in \<module\>
> 18 
> 19 from keras import backend
> \---\> 20 from keras.layers import advanced\_activations
> 21 from keras.utils.generic\_utils import deserialize\_keras\_object
> 22 from keras.utils.generic\_utils import serialize\_keras\_object
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\layers\\\_\_init\_\_.py in \<module\>
> 21 
> 22 # Generic layers.
> \---\> 23 from keras.engine.input\_layer import Input
> 24 from keras.engine.input\_layer import InputLayer
> 25 from keras.engine.input\_spec import InputSpec
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\engine\\input\_layer.py in \<module\>
> 19 from keras import backend
> 20 from keras.distribute import distributed\_training\_utils
> \---\> 21 from keras.engine import base\_layer
> 22 from keras.engine import keras\_tensor
> 23 from keras.engine import node as node\_module
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\engine\\base\_layer.py in \<module\>
> 40 from keras.engine import node as node\_module
> 41 from keras.mixed\_precision import autocast\_variable
> \---\> 42 from keras.mixed\_precision import loss\_scale\_optimizer
> 43 from keras.mixed\_precision import policy
> 44 from keras.saving.saved\_model import layer\_serialization
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\mixed\_precision\\loss\_scale\_optimizer.py in \<module\>
> 16 
> 17 from keras import backend
> \---\> 18 from keras import optimizers
> 19 from keras.mixed\_precision import loss\_scale as keras\_loss\_scale\_module
> 20 from keras.optimizer\_v2 import optimizer\_v2
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\optimizers.py in \<module\>
> 24 from keras.optimizer\_v1 import Optimizer
> 25 from keras.optimizer\_v1 import TFOptimizer
> \---\> 26 from keras.optimizer\_v2 import adadelta as adadelta\_v2
> 27 from keras.optimizer\_v2 import adagrad as adagrad\_v2
> 28 from keras.optimizer\_v2 import adam as adam\_v2
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\optimizer\_v2\\adadelta.py in \<module\>
> 20 import numpy as np
> 21 from keras import backend\_config
> \---\> 22 from keras.optimizer\_v2 import optimizer\_v2
> 23 from tensorflow.python.util.tf\_export import keras\_export
> 24 
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\keras\\optimizer\_v2\\optimizer\_v2.py in \<module\>
> 34 
> 35 
> \---\> 36 keras\_optimizers\_gauge = tf.\_\_internal\_\_.monitoring.BoolGauge(
> 37 "/tensorflow/api/keras/optimizers", "keras optimizer usage", "method")
> 38 
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\tensorflow\\python\\eager\\monitoring.py in \_\_init\_\_(self, name, description, \*labels)
> 358 \*labels: The label list of the new metric.
> 359 """
> \--\> 360 super(BoolGauge, self).\_\_init\_\_('BoolGauge', \_bool\_gauge\_methods,
> 361 len(labels), name, description, \*labels)
> 362 
> 
> c:\\users\\admin\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\tensorflow\\python\\eager\\monitoring.py in \_\_init\_\_(self, metric\_name, metric\_methods, label\_length, \*args)
> 133 self.\_metric\_name, len(self.\_metric\_methods)))
> 134 
> \--\> 135 self.\_metric = self.\_metric\_methods\[self.\_label\_length\].create(\*args)
> 136 
> 137 def \_\_del\_\_(self):
> 
> AlreadyExistsError: Another metric with the same name already exists.
> \`\`\`
> 
> \*\*Describe the expected behavior\*\*
> 
> No error should appear

Thank you [lgusm](https://tensorflow-prod.ospodiscourse.com/u/lgusm) for your kind support

---

<div class="post-metadata">

**Author:** ![lgusm](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lgusm/32/6230_2.png) [@lgusm](https://discuss.ai.google.dev/u/lgusm)\
**Post date:** [August 20, 2021, 12:14pm UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/10 "2021-08-20T12:14:02Z")

</div>

Thank you for bringing that up and creating the bug! Let’s make TF better for everyone!

---

<div class="post-metadata">

**Author:** ![RamKiran](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ramkiran/32/6540_2.png) [@RamKiran](https://discuss.ai.google.dev/u/RamKiran)\
**Post date:** [September 7, 2021, 7:14am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/12 "2021-09-07T07:14:03Z")

</div>

When i tried to run beginner.ipynb file i a getting error-tensorflow.python.framework.errors\_impl.AlreadyExistsError: Another metric with the same name already exists.

---

<div class="post-metadata">

**Author:** ![lgusm](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lgusm/32/6230_2.png) [@lgusm](https://discuss.ai.google.dev/u/lgusm)\
**Post date:** [September 7, 2021, 10:13am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/14 "2021-09-07T10:13:16Z")

</div>

I tried running the notebook and I got some other error when showing the dataset, maybe the notebook need some update

I found the creator here [x.com](https://twitter.com/amogh7joshi)  
but I can’t message him. It would be great to bring awareness to them.

---

<div class="post-metadata">

**Author:** ![Amogh7Joshi](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/amogh7joshi/32/8785_2.png) [@Amogh7Joshi](https://discuss.ai.google.dev/u/Amogh7Joshi)\
**Post date:** [September 7, 2021, 3:13pm UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/16 "2021-09-07T15:13:39Z")

</div>

I’ve ran the notebook again in TF 2.4, 2.5, and 2.6, and while I found the error with showing the dataset, I can’t seem to reproduce the AlreadyExistsError. Maybe try restarting your runtime or seeing if you accidentally modified the code somewhere?

---

<div class="post-metadata">

**Author:** ![RamKiran](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ramkiran/32/6540_2.png) [@RamKiran](https://discuss.ai.google.dev/u/RamKiran)\
**Post date:** [September 8, 2021, 4:36am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/18 "2021-09-08T04:36:50Z")

</div>

AlreadyExistsError comes in local command prompt on windows.I had installed 2.6.0 and python 3.8. i get this error when i run python beginner.py in command prompt.

---

<div class="post-metadata">

**Author:** ![yt011](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/yt011/32/8815_2.png) [@yt011](https://discuss.ai.google.dev/u/yt011)\
**Post date:** [September 26, 2021, 10:31am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/20 "2021-09-26T10:31:02Z")

</div>

Same problem here – try running this code for example: [https://github.com/mlflow/mlflow/tree/master/examples/tensorflow/tf2](https://github.com/mlflow/mlflow/tree/master/examples/tensorflow/tf2) .  
System details: Win 10, TF 2.6.0, Python 3.8.8.  
Please resolve this annoying issue which blocks my project.

---

<div class="post-metadata">

**Author:** ![jeongukjae](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/jeongukjae/32/10677_2.png) [@jeongukjae](https://discuss.ai.google.dev/u/jeongukjae)\
**Post date:** [November 4, 2021, 8:59am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/22 "2021-11-04T08:59:35Z")

</div>

Same problem here, but below issues help me to fix this error.

[https://github.com/tensorflow/tensorflow/issues/51592#issuecomment-960363675](https://github.com/tensorflow/tensorflow/issues/51592#issuecomment-960363675)  
[https://github.com/tensorflow/tensorflow/issues/52922](https://github.com/tensorflow/tensorflow/issues/52922)

---

<div class="post-metadata">

**Author:** ![swapnil\_kadav](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/swapnil_kadav/32/9487_2.png) [@swapnil\_kadav](https://discuss.ai.google.dev/u/swapnil_kadav)\
**Post date:** [November 5, 2021, 3:04am UTC](https://discuss.ai.google.dev/t/alreadyexistserror-another-metric-with-the-same-name-already-exists/32486/23 "2021-11-05T03:04:30Z")

</div>

# Import Libraries

import warnings  
warnings.filterwarnings(“ignore”)  
import tensorflow as tf  
import os  
import glob  
import matplotlib.pyplot as plt

# Keras API

import keras  
from keras.models import Sequential  
from keras.layers import Dense,Dropout,Flatten  
from keras.layers import Conv2D,MaxPooling2D,Activation,AveragePooling2D,BatchNormalization  
from keras.preprocessing.image import ImageDataGenerator

**when I imports then it shows me**

AlreadyExistsError Traceback (most recent call last)  
 in   
7 import matplotlib.pyplot as plt  
8 # Keras API  
----\> 9 import keras  
10 from keras.models import Sequential  
11 from keras.layers import Dense,Dropout,Flatten

D:\anaconda\lib\site-packages\keras\__init_\_.py in   
23  
24 # See b/110718070#comment18 for more details about this import.  
—\> 25 from keras import models  
26  
27 from keras.engine.input\_layer import Input

D:\anaconda\lib\site-packages\keras\models.py in   
18 import tensorflow.compat.v2 as tf  
19 from keras import backend  
—\> 20 from keras import metrics as metrics\_module  
21 from keras import optimizer\_v1  
22 from keras.engine import functional

D:\anaconda\lib\site-packages\keras\metrics.py in   
24  
25 import numpy as np  
—\> 26 from keras import activations  
27 from keras import backend  
28 from keras.engine import base\_layer

D:\anaconda\lib\site-packages\keras\activations.py in   
18  
19 from keras import backend  
—\> 20 from keras.layers import advanced\_activations  
21 from keras.utils.generic\_utils import deserialize\_keras\_object  
22 from keras.utils.generic\_utils import serialize\_keras\_object

D:\anaconda\lib\site-packages\keras\layers\__init_\_.py in   
21  
22 # Generic layers.  
—\> 23 from keras.engine.input\_layer import Input  
24 from keras.engine.input\_layer import InputLayer  
25 from keras.engine.input\_spec import InputSpec

D:\anaconda\lib\site-packages\keras\engine\input\_layer.py in   
19 from keras import backend  
20 from keras.distribute import distributed\_training\_utils  
—\> 21 from keras.engine import base\_layer  
22 from keras.engine import keras\_tensor  
23 from keras.engine import node as node\_module

D:\anaconda\lib\site-packages\keras\engine\base\_layer.py in   
41 from keras.engine import node as node\_module  
42 from keras.mixed\_precision import autocast\_variable  
—\> 43 from keras.mixed\_precision import loss\_scale\_optimizer  
44 from keras.mixed\_precision import policy  
45 from keras.saving.saved\_model import layer\_serialization

D:\anaconda\lib\site-packages\keras\mixed\_precision\loss\_scale\_optimizer.py in   
16  
17 from keras import backend  
—\> 18 from keras import optimizers  
19 from keras.mixed\_precision import loss\_scale as keras\_loss\_scale\_module  
20 from keras.optimizer\_v2 import optimizer\_v2

D:\anaconda\lib\site-packages\keras\optimizers.py in   
24 from keras.optimizer\_v1 import Optimizer  
25 from keras.optimizer\_v1 import TFOptimizer  
—\> 26 from keras.optimizer\_v2 import adadelta as adadelta\_v2  
27 from keras.optimizer\_v2 import adagrad as adagrad\_v2  
28 from keras.optimizer\_v2 import adam as adam\_v2

D:\anaconda\lib\site-packages\keras\optimizer\_v2\adadelta.py in   
20 import numpy as np  
21 from keras import backend\_config  
—\> 22 from keras.optimizer\_v2 import optimizer\_v2  
23 from tensorflow.python.util.tf\_export import keras\_export  
24

D:\anaconda\lib\site-packages\keras\optimizer\_v2\optimizer\_v2.py in   
34  
35  
—\> 36 keras\_optimizers\_gauge = tf. **internal**.monitoring.BoolGauge(  
37 “/tensorflow/api/keras/optimizers”, “keras optimizer usage”, “method”)  
38

D:\anaconda\lib\site-packages\tensorflow\python\eager\monitoring.py in **init** (self, name, description, \*labels)  
358 \*labels: The label list of the new metric.  
359 “”"  
 → 360 super(BoolGauge, self). **init** (‘BoolGauge’, \_bool\_gauge\_methods,  
361 len(labels), name, description, \*labels)  
362

D:\anaconda\lib\site-packages\tensorflow\python\eager\monitoring.py in **init** (self, metric\_name, metric\_methods, label\_length, \*args)  
133 self.\_metric\_name, len(self.\_metric\_methods)))  
134  
 → 135 self.\_metric = self.\_metric\_methods[self.\_label\_length].create(\*args)  
136  
137 def **del** (self):

AlreadyExistsError: Another metric with the same name already exists.

**How can I Fix this 😕**
