required=False, type=str, default=None) parser.add_argument("--dataset", help="path to your dataset", required=True, type=str) parser.add_argument("--configuration", help="which configuration file to use", required=True, type=str) parser.add_argument("--gpu", help="which gpu to use, by deault all will be utilized", type=int, default=-1) args = parser.parse_args() factory = MachineFactory(config_file=args.configuration) model = factory.load_model(name=args.model) if args.gpu < 0: factory.train(args.dataset, model=model, gpus=get_gpu_count()) else: os.environ['CUDA_VISIBLE_DEVICES'] = "{}".format(args.gpu) factory.train(args.dataset, model=model, gpus=1) # uploading dataset to cloud storage for reuse by other software share = S3Share() share.submit(args.dataset)
def test_train_model(): machine = MachineFactory() machine.train("datasets/clean_dirty", gpus=1)