public static void configureArguments(ArgumentParser parser) { parser.description("Trains a recommendation model and write it to disk."); ScriptEnvironment.configureArguments(parser); InputData.configureArguments(parser); parser .addArgument("-o", "--output-file") .type(File.class) .metavar("FILE") .setDefault("model.bin") .help("write trained model to FILE"); parser .addArgument("config") .type(File.class) .nargs("+") .metavar("CONFIG") .help("load algorithm configuration from CONFIG"); }
public static void configureArguments(ArgumentParser parser) { InputData.configureArguments(parser); ScriptEnvironment.configureArguments(parser); parser .addArgument("-c", "--config-file") .type(File.class) .action(Arguments.append()) .metavar("FILE") .help("use configuration from FILE"); parser .addArgument("-m", "--model-file") .type(File.class) .metavar("FILE") .help("load model from FILE"); parser.addArgument("--print-channel").metavar("CHAN").help("also print value from CHAN"); parser.addArgument("user").type(Long.class).metavar("USER").help("predict for USER"); parser .addArgument("items") .type(Long.class) .metavar("ITEM") .nargs("+") .help("predict for ITEMs"); }