

data = pd.read_csv(tsv_path, sep="\t")
train_dataset = TableDataset(data, tokenizer)
output_signature = (
     tf.TensorSpec(shape=(512,), dtype=tf.int32),
     tf.TensorSpec(shape=(512,), dtype=tf.int32),
     tf.TensorSpec(shape=(512,), dtype=tf.float32),
     tf.TensorSpec(shape=(512,), dtype=tf.float32),
     tf.TensorSpec(shape=(512, 7), dtype=tf.int32),
     tf.TensorSpec(shape=(512,), dtype=tf.int32),
     tf.TensorSpec(shape=(512,), dtype=tf.float32),
 )
train_dataloader = tf.data.Dataset.from_generator(train_dataset, output_signature=output_signature).batch(32)