def run_dsm(input_option, args): ######## preprocessing traces & trace sampling ########### input_sampler.select_traces(input_option.raw_input_trace_file, input_option.cluster_trace_file) ######## train RNNLM model ######## if not os.path.isdir(input_option.save_dir): os.makedirs(input_option.save_dir) p = multiprocessing.Process(target=RNNLM_training.train, args=(args, )) p.start() p.join() # RNNLM_training.train(input_option.args) ######## feature extraction ######## feature_extractor.feature_engineering(input_option) ######## clustering ######## clustering_processing.clustering_step(input_option) ######## model selection ####### final_file = model_selection.selecting_model(input_option) print("Done! Final FSM is stored in", final_file)
if not os.path.isdir(input_option.args.save_dir) or ( input_option.args.additional_trace is not None and input_option.args.init_from is not None): if not os.path.isdir(input_option.args.save_dir): os.makedirs(input_option.args.save_dir) p = multiprocessing.Process(target=RNNLM_training.train, args=(input_option.args, )) p.start() p.join() #RNNLM_training.train(input_option.args)s ######## feature extraction ######## feature_extractor.feature_engineering(input_option) ######## clustering ######## clustering_processing.clustering_step(input_option) ######## model selection ####### final_file = model_selection.selecting_model(input_option) print("Done! Final FSM is stored in", final_file) ######## merge two automata ###### if input_option.update_mode: model_updater.update(input_option)