tensorflow / model-remediation

Model Remediation is a library that provides solutions for machine learning practitioners working to create and train models in a way that reduces or eliminates user harm resulting from underlying performance biases.
https://www.tensorflow.org/responsible_ai/model_remediation?hl=en
Apache License 2.0
42 stars 19 forks source link

ValueError: The following keyword arguments are not supported by this model: ['labels']. #25

Closed Rishikumar04 closed 2 years ago

Rishikumar04 commented 2 years ago

ValueError: in user code:

/usr/local/lib/python3.7/dist-packages/transformers/trainer_tf.py:706 distributed_training_steps  *
    self.args.strategy.run(self.apply_gradients, inputs)
/usr/local/lib/python3.7/dist-packages/transformers/trainer_tf.py:648 apply_gradients  *
    gradients = self.training_step(features, labels, nb_instances_in_global_batch)
/usr/local/lib/python3.7/dist-packages/transformers/trainer_tf.py:631 training_step  *
    per_example_loss, _ = self.run_model(features, labels, True)
/usr/local/lib/python3.7/dist-packages/transformers/trainer_tf.py:753 run_model  *
    outputs = self.model(features, labels=labels, training=training)[:2]
/usr/local/lib/python3.7/dist-packages/transformers/models/bert/modeling_tf_bert.py:872 call  *
    inputs = input_processing(
/usr/local/lib/python3.7/dist-packages/transformers/modeling_tf_utils.py:355 input_processing  *
    raise ValueError(

ValueError: The following keyword arguments are not supported by this model: ['labels'].

Does anyone have idea how to overcome this issue?

seano314 commented 2 years ago

Hey Rishikumar, Can you provide a little more information on recreating this issue? From the looks of it it seems like it is similar to the below: https://github.com/tensorflow/model-remediation/issues/24