Access feature in custom compute_loss method
I’m running into a Hugging Face issue when fine-tuning a model and want to access other features during my customcompute_lossfunction. However, I am unable to access these in theinputsobject passed into thecompute_lossfunction, even though the train_dataset I pass into my CustomTrainer includes this feature. When I calltrainer.train(), I get the following error.---> z = inputs.pop("feature_a")
KeyError: 'feature_a'I made sure that thetrain_datasetpassed into my CustomTrainer includes “feature_a”, as well as includeremove_unused_columns=Falsein the TrainingArguments and implementdata_collatorthat returns{"input_ids": input_ids, "attention_mask": attention_mask, "labels": labels, "feature_a": feature_a}.Is it possible to access additional features (other thanlabelsandinput_ids) in a customcompute_lossfunction and if so, what I should do to fix this issue of the feature not being in theinputsobject passed intocompute_loss?