FAILED_PRECONDITION: Attempting to use uninitialized value auc_8/true_negatives

below is the code that gives me error
auc = tf.compat.v1.metrics.auc(batch_y,tf.nn.sigmoid(pred))
train_auc = sess.run(auc, feed_dict= {x:batch_x, y:batch_y})

Error=
FailedPreconditionError: 2 root error(s) found.
(0) FAILED_PRECONDITION: Attempting to use uninitialized value auc_8/true_negatives
[[node auc_8/true_negatives/read
(defined at :31)

tried several options:
tf.compat.v1.disable_eager_execution()
init = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer())

running short of ideas, any help?

What is your TF version?

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

2.7.0

Do you have a few lines but standalone code/colab to reproduce this?