Summary: 10 instances, 10 unique Text Count # TODO: later merge it into the model 1 # TODO: Very rare cases where the replacement is '' should be handled gracefully 1 # TODO: fix it after Python2 EOL 1 # TODO: The right place for this offset would be inside 1 # TODO remove this once we update apex with the fix 1 sample_size = ntokens #TODO why not merge ntokens and sample_size? what is the difference? 1 # TODO: later merge it into the model 1 # TODO: print should really go to logger, this print goes 1 # # TODO: Completely move masking to the model for general purposes. 1 length_target = sample['net_input']['prev_output_tokens'].ne(self.padding_idx).sum(-1).unsqueeze(-1) #TODO doesn't work for dynamic length. change to eos-based method. 1