Non explicit error message in model.fit

I am using a combined transformer and CNN model to predict image data, the model builds and compiles, but during training, it fails on the first epoch with an error. Can someone please help in identifying where I am going wrong?
Error -
KeyError Traceback (most recent call last)
in <cell line: 41>()
39
40 modelCombined = create_combined_model(input_shape, 2, 12)
—> 41 history = run_experiment(modelCombined)
42
43

12 frames
in run_experiment(model)
21 )
22
—> 23 history = model.fit(
24 x=x_train,
25 y=y_train,

/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py in error_handler(*args, **kwargs)
111 def error_handler(*args, **kwargs):
112 if not is_traceback_filtering_enabled():
→ 113 return fn(*args, **kwargs)
114
115 filtered_tb = None

/usr/local/lib/python3.10/dist-packages/keras/src/backend/tensorflow/trainer.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq)
323 for step, iterator in epoch_iterator.enumerate_epoch():
324 callbacks.on_train_batch_begin(step)
→ 325 logs = self.train_function(iterator)
326 callbacks.on_train_batch_end(
327 step, self._pythonify_logs(logs)

/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/traceback_utils.py in error_handler(*args, **kwargs)
151 except Exception as e:
152 filtered_tb = _process_traceback_frames(e.traceback)
→ 153 raise e.with_traceback(filtered_tb) from None
154 finally:
155 del filtered_tb

/usr/local/lib/python3.10/dist-packages/keras/src/backend/tensorflow/trainer.py in one_step_on_iterator(iterator)
116 “”“Runs a single training step given a Dataset iterator.”“”
117 data = next(iterator)
→ 118 outputs = self.distribute_strategy.run(
119 one_step_on_data, args=(data,)
120 )

/usr/local/lib/python3.10/dist-packages/keras/src/backend/tensorflow/trainer.py in one_step_on_data(data)
104 def one_step_on_data(data):
105 “”“Runs a single training step on a batch of data.”“”
→ 106 return self.train_step(data)
107
108 if not self.run_eagerly:

/usr/local/lib/python3.10/dist-packages/keras/src/backend/tensorflow/trainer.py in train_step(self, data)
55 with tf.GradientTape() as tape:
56 if self._call_has_training_arg:
—> 57 y_pred = self(x, training=True)
58 else:
59 y_pred = self(x)

/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py in error_handler(*args, **kwargs)
111 def error_handler(*args, **kwargs):
112 if not is_traceback_filtering_enabled():
→ 113 return fn(*args, **kwargs)
114
115 filtered_tb = None

/usr/local/lib/python3.10/dist-packages/keras/src/layers/layer.py in call(self, *args, **kwargs)
812 outputs = super().call(*args, **kwargs)
813 else:
→ 814 outputs = super().call(*args, **kwargs)
815 # Change the layout for the layer output if needed.
816 # This is useful for relayout intermediate tensor in the model

/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py in error_handler(*args, **kwargs)
111 def error_handler(*args, **kwargs):
112 if not is_traceback_filtering_enabled():
→ 113 return fn(*args, **kwargs)
114
115 filtered_tb = None

/usr/local/lib/python3.10/dist-packages/keras/src/ops/operation.py in call(self, *args, **kwargs)
54 return self.quantized_call(*args, **kwargs)
55 else:
—> 56 return self.call(*args, **kwargs)
57
58 def symbolic_call(self, *args, **kwargs):

/usr/local/lib/python3.10/dist-packages/keras/src/models/functional.py in call(self, inputs, training, mask)
192 if mask is not None:
193 x._keras_mask = mask
→ 194 outputs = self._run_through_graph(
195 inputs, operation_fn=lambda op: operation_fn(op, training=training)
196 )

/usr/local/lib/python3.10/dist-packages/keras/src/ops/function.py in _run_through_graph(self, inputs, operation_fn)
157 output_tensors = []
158 for x in self.outputs:
→ 159 output_tensors.append(tensor_dict[id(x)])
160
161 return tree.pack_sequence_as(self._outputs_struct, output_tensors)

KeyError: 138703080200352

Hi @shantanu_shastri, Generally this keyerror occurs when you try to access the value from the dictionary by using key which is not present in the dictionary. For example,

dict = {'a':'1','b':'2'}
dict[1] >>>>KeyError: 1

If possible please provide the standalone code and sample data to reproduce the issue. so that it will be easy to debug. Thank You.