HHousen / TransformerSum

Consider using in PYL-R1714
Performance
Major
a year ago4 years old
Consider merging these comparisons with 'in' by using 'self.hparams.data_type not in (most_common, 'none')'. Use a set instead if elements are hashable.
 481                # then warn the user they may have chosen the wrong data type.
 482                most_common = statistics.mode(dataset_files_extensions)[1:]
 483                if (
 484                    most_common != self.hparams.data_type 485                    and self.hparams.data_type != "none"
 486                ):
 487                    logger.warning(