e8db6660b202733a5764e9e9add869dbde8dbc32,skll/utilities/join_features.py,,main,#Any#,23

Before Change



    valid_extensions = [ext for ext in EXT_TO_READER if ext != ".libsvm"]

    if input_extension == ".libsvm":
        raise ValueError("Cannot join LibSVM files.  Please use skll_convert"
                         " to convert to a different datatype first.")
    elif input_extension not in valid_extensions:
        logger.error(("Input file must be in either .arff, .csv, .jsonlines, "
                      ".megam, .ndj, or .tsv format. You specified: "
                      "{}").format(input_extension))
        sys.exit(1)

    // Read and merge input files
    merged_set = None
    for infile in args.infile:
        reader = EXT_TO_READER[input_extension](args.infile, quiet=args.quiet,
                                                label_col=args.label_col)

After Change


    valid_extensions = [ext for ext in EXT_TO_READER if ext != ".libsvm"]

    // make sure the input file extensions are those we can process
    input_extensions = [os.path.splitext(inf)[1].lower() for inf in args.infile]
    output_extension = os.path.splitext(args.outfile)[1].lower()

    // 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)

    if output_extension != input_extension_set[0]:
        logger.error(("Output file must be in the same format as the input file. "
                      "You specified: {}").format(output_extension))
        sys.exit(1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: EducationalTestingService/skll
Commit Name: e8db6660b202733a5764e9e9add869dbde8dbc32
Time: 2014-11-06
Author: nmadnani@ets.org
File Name: skll/utilities/join_features.py
Class Name:
Method Name: main


Project Name: EducationalTestingService/skll
Commit Name: 84c6230896e6fee31ecca27fa9fe4a4306b89b60
Time: 2014-08-06
Author: dblanchard@ets.org
File Name: skll/data.py
Class Name:
Method Name: write_feature_file


Project Name: tensorflow/magenta
Commit Name: 8f838bb28ef7a3122732c56ad6604df6298323ef
Time: 2018-11-28
Author: jesse.engel@gmail.com
File Name: magenta/models/nsynth/wavenet/nsynth_generate.py
Class Name:
Method Name: main