// make sure all the files are in the same format except libsvm files
input_extension_set = list(set(input_extensions))
if len(input_extension_set) > 1 or input_extension_set[0] not in valid_extensions:
logger.error(("All input files must be in the same format: .arff, .csv, .jsonlines, "
".megam, .ndj, or .tsv format."))
sys.exit(1)
After Change
logger = logging.getLogger(__name__)
// all extensions except .libsvm can be processed
valid_extensions = {ext for ext in EXT_TO_READER if ext != ".libsvm"}
// make sure the input file extensions are those we can process
input_extension_set = {os.path.splitext(inf)[1].lower() for inf in
args.infile}