traind = None if class_name in class_options: traind = class_options[class_name] elif not recover and not testdatafor: print('available classes:') for key, val in class_options.iteritems(): print(key) raise Exception('wrong class selection') if testdatafor: logging.info('converting test data, no weights applied') dc.createTestDataForDataCollection( testdatafor, infile, outPath, outname=(args.batch if args.batch else 'dataCollection.dc'), traind=(traind(class_args) if traind else None), relpath=relpath) elif recover: dc.recoverCreateDataFromRootFromSnapshot(recover) elif args.means: dc.convertListOfRootFiles(infile, traind(class_args) if class_args else traind(), outPath, means_only=True, output_name='batch_template.dc', relpath=relpath) else: logging.info('Start conversion') dc.convertListOfRootFiles(
useRelativePaths=True if not args.noRelativePaths else False) if len(nchilds): dc.nprocs = int(nchilds) if class_name in class_options: traind = class_options[class_name] elif not recover and not testdatafor: print('available classes:') for key, val in class_options.iteritems(): print(key) raise Exception('wrong class selection') if testdatafor: logging.info('converting test data, no weights applied') dc.createTestDataForDataCollection( testdatafor, infile, outPath, outname=args.batch if args.batch else 'dataCollection.dc', batch_mode=bool(args.batch)) elif recover: dc.recoverCreateDataFromRootFromSnapshot(recover) elif args.means: dc.convertListOfRootFiles(infile, traind(), outPath, means_only=True, output_name='batch_template.dc') else: dc.convertListOfRootFiles( infile, traind(), outPath,
dc.nprocs = int(nchilds) traind = None if class_name in class_options: traind = class_options[class_name] elif not recover and not testdatafor: print('available classes:') for key, val in class_options.iteritems(): print(key) raise Exception('wrong class selection') if testdatafor: logging.info('converting test data, no weights applied') dc.createTestDataForDataCollection( testdatafor, infile, outPath, outname=args.batch if args.batch else 'dataCollection.dc', batch_mode=bool(args.batch), traind=traind(class_args) if traind else None) elif recover: dc.recoverCreateDataFromRootFromSnapshot(recover) elif args.means: dc.convertListOfRootFiles(infile, traind(class_args) if class_args else traind(), outPath, means_only=True, output_name='batch_template.dc') else: dc.convertListOfRootFiles( infile, traind(class_args) if class_args else traind(),