    def num_tokens(self, index):
        """Just use the tgt dataset num_tokens"""
        return self.tgt_dataset.num_tokens(index)
Just use the tgt dataset num_tokens
fairseq/data/backtranslation_dataset.py