def showStructure(self, fenetre, idConf): # Get config config = db.getConfig(self.conn, idConf) dialogShowStructure = view.TextModalWindow(fenetre, None) dialogShowStructure.run(config["structure"], True)
def updateConfig(self, fenetre, idConf): "Update new config" # Get config config = db.getConfig(self.conn, idConf) viewConfig = view.CreateOrUpdateConfigWindow(fenetre, self.doUpdateConfig) #Get machine names machineNames = db.getMachineNames(self.conn) # Add machine name idMachine = config["idMachine"] machineName = db.getMachineNameById(self.conn, idMachine) config["machine"] = machineName # launch view with callback viewConfig.run(machineNames, config)
def start(self, fenetre, idDataset, idConfig): # Get form fields for machine config = db.getConfig(self.conn, idConfig) # Get machine name machineName = db.getMachineNameById(self.conn, config["idMachine"]) # Get fields machineFields = self.confMachinesForms[machineName] # Get default values selectionKey = "dataset=" + str(idDataset) + ";config=" + str(idConfig) machineFieldValues = db.getSelection(self.conn, selectionKey) # Launch run dialog startTrainingDialog = view.StartTrainDialog(fenetre, self.conn, selectionKey, fenetre.doRunTraining, machineFields, machineFieldValues) startTrainingDialog.run()
def updateHyperParams(self, fenetre, idConf): # get idDataset nameDataset = fenetre.varDataset.get() idDataset = db.getDatasetIdByName(self.conn, nameDataset) # Get config self.config = db.getConfig(self.conn, idConf) # get hyper parameters hyperParams = db.getHyperParams(self.conn, idDataset, idConf) # get best hyper params (bestHyperParams, bestDevAccuracy, _) = db.getBestHyperParams(self.conn, idDataset, idConf) # Launch window, it may update hps viewHp = view.ViewOrUpdateHyperParamsWindow( fenetre, self.doCreateOrUpdateHyperParams) # launch view with callback viewHp.run(hyperParams, bestHyperParams, bestDevAccuracy)
{ "comment": "", "tune": False, "showPlots": False, "nbTuning": 2, "isTensorboard": debugIsTensorBord, "isTensorboardFull": False }, { "choiceHyperParams" : 1, "choiceData" : 1 } ) # cancel? if ( buttonClicked == "Cancel" ) : logger.info( "Operation cancelled by user" ) sys.exit( 10 ) # dataset idDataset = db.getDatasetIdByName( conn, datasetName ) dataset = db.getDatasetById( conn, idDataset ) logger.info( "Using dataset {0}".format( dataset ) ) # Read config config = db.getConfig( conn, idConfig ); # get machine name machineName = db.getMachineNameById( conn, config[ "idMachine" ] ) logger.info( "Structure:" ) logger.info( config[ "structure" ] ) # get hyper parameters if ( buttonClicked == "Train" ) : # Get config hyper parameters hyperParams = db.getHyperParams( conn, idDataset, config[ "id" ] ) elif ( buttonClicked == "Predict" ) : # hyper parameters depend on choice