In case of training conditional model (e.g BartForConditionalGeneration), when decoder_input_ids is absent it will be created automatically by right-shift of labels:
  
      github.com
  
  
    huggingface/transformers/blob/8d43c71a1ca3ad322cc45008eb66a5611f1e017e/src/transformers/models/bart/modeling_bart.py#L1283-L1287 3

if labels is not None:
    if decoder_input_ids is None:
        decoder_input_ids = shift_tokens_right(
            labels, self.config.pad_token_id, self.config.decoder_start_token_id
        )



  
  
    
    
  
  


In case of training bare model (e.g BartModel), when decoder_input_ids is absent it will be created automatically by right-shift of input_ids:
  
      github.com
  
  
    huggingface/transformers/blob/8d43c71a1ca3ad322cc45008eb66a5611f1e017e/src/transformers/models/bart/modeling_bart.py#L1147-L1152

# different to other models, Bart automatically creates decoder_input_ids from
# input_ids if no decoder_input_ids are provided
if decoder_input_ids is None and decoder_inputs_embeds is None:
    decoder_input_ids = shift_tokens_right(
        input_ids, self.config.pad_token_id, self.config.decoder_start_token_id
    )



  
  
    
    
  
  


By the way, try
"inputs_ids": source_data["inputs_ids"]
instead of
"inputs_idx": source_data["inputs_idx"]